NLP/AI/Statistics

[cs231n] Note 6: Neural Network-2 (Batch Normalization) 본문

Stanford Lectures : AI/CS231n

[cs231n] Note 6: Neural Network-2 (Batch Normalization)

Danbi Cho 2021. 4. 15. 20:45

이번 글에서는 Batch Normalization에 대하여 소개하고자 한다. 

 

Batch normalization (BN, 배치 정규화)는 가우시안 분포를 통해 신경망을 적절하게 초기화시키는 방법이다. 

 

BN은 레이어에서 출력되는 batch 사이즈 만큼의 activation을 가우시안 분포에 적합하도록 하는 것이 목적이다. 

 

그래서 이 방법은 학습할 때마다 각 레이어에서 수행되어야 하며 모든 레이어에서 가우시안 분포가 되도록 해준다. 

 

즉, batch 단위로 레이어의 입력 값들을 정규화해준다. 

 

 

위는 cs231n의 슬라이드 일부이다. 

 

위의 수식과 같이 BN은 D차원의 batch에 대하여 각 feature 별로 평균과 분산을 구하여 정규화시켜주는 방식으로 진행된다. 

 

보통 BN는 신경망 구조 내에서 fully connected layer나 convolutional layer 이후, 혹은 non-linear function 이전에 삽입된다.

 

 

참고) https://cs231n.github.io/neural-networks-2/#batchnorm

 

CS231n Convolutional Neural Networks for Visual Recognition

Table of Contents: Setting up the data and the model In the previous section we introduced a model of a Neuron, which computes a dot product following a non-linearity, and Neural Networks that arrange neurons into layers. Together, these choices define the

cs231n.github.io

http://cs231n.stanford.edu/slides/2021/lecture_7.pdf

 

Comments