Someone asked this question already but I could not find an intuitive explanation. Hence thought of opening a new topic thread.
here is the link to the original post
https://forums.fast.ai/t/why-is-it-the-batchnorm2d-layers-in-a-frozen-model-trainable/38944/2
My understanding is by default when we create a learner object from a model and data bunch the underlying network architecture’s layers are frozen except the custom layer that is added for the specific classification problem.
learn = cnn_learner(data, models.resnet34, metrics=error_rate)
However when I print summary on the learner, noticed the batch norm layers are all set to be trainable. Meaning the weights will get updated even when the model is frozen and only the last few layers are supposed to have its weights updated.
Can anybody explain the intuition on this please?
Many thanks
Amit