Batch Normalization

What is the use of Batch Normalization layer? Is it also trained during model training? How no. of params is calculated in case of batch normalization layer? Why did we use Batch Normalization in generator but we didn’t use it in discriminator?

Hey @preetishvij, Batchnormalization layer is used to normalize the outputs of previous layers. Batch normalization is a technique for training very deep neural networks that standardizes the inputs to a layer for each mini-batch. This has the effect of stabilizing the learning process and dramatically reducing the number of training epochs required to train deep networks.

Batchnormalization layer contains these 4 parameters, [gamma weights, beta weights, moving_mean(non-trainable), moving_variance(non-trainable)]. First two are trainable.

Now you could easily calculate number of parameters, in case if Batchnorm is added after dense layer, number of parameters will be equal to 4* number of outputs of previous dense layer. If its added after convolution layer, than number of parameters will be 4 * number of kernels in previous layer.

The last part of the question, you can’t interpret in one go, you have to apply it and test the results than only you can infer should it be applied or not.

Hope this resolved your doubt.
Don’t forget to mark the doubt as resolved in my doubts sectionl. :blush:

1 Like