deep learning
-
[Deep Learning] Chapter12 Transformers2Deep Learning 2024. 1. 9. 19:13
12.5. Transformers for Natural Language Processing지금까지 transformer 구조에 대하여 공부하였다. 본 섹션에서는 transformer 가 어떻게 NLP tasks에 사용되는지 소개한다. NLP tasks 들은 text 를 words 혹은 word fragments 와 같은 token 으로 나누는 tokenizer 로 시작을 한다. 그리고 각 token 들은 사전에 학습된 embedding 으로 mapping 된다. 그리고 embeddings 는 series of transformers 의 입력으로 주어진다.이들이 순서대로 어떻게 동작하는지 살펴본다.12.5.1. TokenizationText processing pipeline 은 tokenizer 로 시작..
-
[Deep Learning] Chapter12 Transformers1Deep Learning 2024. 1. 9. 19:08
Chapter 10에서는 convolution operation 을 사용하여 각 이미지의 패치를 shared parameters로 processing 하는 방법을 공부하였다.본 챕터에서는 Transformer 를 소개함. 원래는 NLP tasks 를 위한 모델임. Language datasets은 사실 이미지 datasets의 특성과 맞물리는 부분이 있다. 예를 들어, 입력 variable의 dimension 이 크고, 각 포지션마다 확률적 특성이 비슷하다. 또한 각 포지션에서 “dog” 란 단어를 새로 학습할 필요가 없다. (positional invariance)12.1. Processing Text DataTransformer를 이해하기 위해 다음과 같은 예시를 보자위 예제를 보면 크게 세가지를 알..
-
[Deep Learning] Chapter11 Residual NetworksDeep Learning 2024. 1. 9. 18:47
Chapter 10에서는 CNN에 대하여 공부하고 그 중에서도 AlexNet, VGGNet과 같은 traditional CNN을 살펴보았다. 여기서 AlexNet은 8개의 layers를 가졌고, VGGNet은 18개의 layers를 가졌는데 VGGNet이 더 좋은 성능을 보여 Deeper networks가 더 나은 성능을 기대할 수 있다고 보았다. 하지만, 더 많은 훨씬 더 많은 layer를 추가하자 오히려 다시 성능이 감소하는 현상을 관측하였다. 본 챕터에서는 network를 더욱 deeper하게 설계할 수 있는 기술인 residual connection (skip connection) 과 batch normalization 에 대하여 공부한다.Residual connection과 batch norma..
-
[Deep Learning] Chapter10 Convolution NetworksDeep Learning 2024. 1. 9. 18:47
Preface10.1. Invariance and Equivariance10.2. Convolutional Networks d for 1D Inputs10.2.1. 1D Convolution Operation10.2.2. Padding10.2.3. Stride, Kernel Size and Dilation10.2.4. Convolutional Layers10.2.5. Channels10.2.6. Convolutional Networks and Receptive Fields10.2.7. Example: MNIST-1D10.3. Convolutional Networks for 2D Inputs10.4. Downsampling and Upsampling10.4.1. Downsampling10.4.2. Upsa..
-
[Deep Learning] Chapter9 RegularizationDeep Learning 2024. 1. 9. 18:46
Chapter 8 에서는 model 의 performance 를 측정하였고 학습 데이터와 테스트 데이터 간의 큰 성능 차이가 존재한다는 것을 확인했다. 이러한 차이의 원인으로는 다음과 같다. (1) 모델이 학습하는 것은 true underlying function 을 학습하는 것이 아닌 학습 데이터의 확률적 특성 (peculiarities) 을 학습한다. (Overfitting) (2) 학습 데이터가 없는 space 에 대해서 모델이 제약을 받지 않는다. 이로 인해 optimal 한 prediction 을 내지 못한다. 본 챕터에서는 regularization techniques 에 대해서 공부한다. 이는 training, test performance 간의 gap 을 줄이는 methods 들의 집합이다..
-
[Deep Learning] Chapter8 Measuring PerformanceDeep Learning 2024. 1. 9. 18:45
Preface이전의 챕터들에서 뉴럴넷, loss 함수 그리고 학습 알고리즘 등을 공부하였다. 이번 챕터에서는 학습된 모델의 성능을 평가하는 방법에 대해 공부한다. 충분한 capacity 를 갖는 모델은 학습 데이터셋에 대하여 완벽하게 fit 될 수 있다. 하지만 이러한 사실이 꼭 테스트 셋에 대하여 잘 generalize 했다고 보기 어렵다.test errors의 세 가지 서로 다른 이유와 다음 세 가지 항목에 대한 이들의 상대적인 영향 (relative contributions) 도 살펴본다. [(1) task의 inherent uncertainty, (2) 학습 데이터의 양, (3) 모델의 선택] 8.1. Training a Simple ModelFig. 8.1에서 제시한 것과 같은 MNIST-1D ..
-
[Deep Learning] Chapter7 Gradients and InitializationDeep Learning 2024. 1. 9. 18:45
Take HomePriliminariesAbstract7.1 Problem Definitions7.2 Computing Derivatives7.3 Toy Example7.4 Backpropagation Algorithm7.4.1. Backpropagation Algorithm Summary7.4.2. Algorithmic Differentiation7.5. Parameter Initialization7.5.1. He Initialization (ReLU 를 쓴다면 이 initialization 을 쓰세요)7.5.3. Initialization for both forward and backward passTake HomeBackpropagation Algorithm이 어떻게 동작하는지에 대한 이해Forwa..
-
[Deep Learning] Fitting ModelsDeep Learning 2023. 10. 9. 16:26
본 포스팅은 Simon J.D. Prince 의 Deep Learning 교재를 스터디하며 정리한 글임을 밝힙니다.https://udlbook.github.io/udlbook/ Take Home모델을 학습하는 것은 파라미터, ϕ\phiϕ 에 대응하는 loss function, L[ϕ]L[\phi]L[ϕ] 를 최소화하는 것으로 생각할 수 있다. Gradient Descent 는 현재 파라미터에서 계산되는 loss의 (해당 지점에서의 uphill) gradient를 계산하고 이의 반대방향인 downhill (gradient에 ×−1\times -1×−1 을 곱하면 됨.) 방향으로 파라미터를 업데이트 한다.non-linear function 에 대한 loss는 non-convex일 확률이 아주아주 높다...