Alexnet Model Implementation

Here is the code:
https://colab.research.google.com/drive/12JEBq8ggjOcmW5FehJFp5pdtumbmXgJ7?usp=sharing

Ques1.) (a.) What parameters does Batch Normalization layer learns ?

(b.) Aren’t there just two parameters - gamma and beta values which needs to be learned in same way as other hyperparameters through backpropagation during the training process ?

(c.) And how to calculate the no of parameters which Batch Normalization layer learns ? (It seems like it is 4*no of channels in previous layer)

Ques2.) My model shows - “Non-trainable params: 21,136’”. What are these non-trainable parameters and from which layers are these coming (basically how are these calculated) ?? I mean I know the definition of non trainable parameters but aren’t all the weights in a keras model trainable by default ?

There are two parameters that are being updated in Batch Normalization layer , beta and gamma.

yes

it learns two parameters only. But it uses the inputs , to update them,

There are some default weights in some layers for example Batch Normalization , that apart from beta and gamma also has other parameters , that are just for statistical / calculation purpose. So , they are counted as params as they take part in underneath calculations , but as they are not updated hence they comes under non_trainable params.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.