Hi everybody,
What I want to do is to use a pretrained network that contains batch normalization layers and perform finetuning. So I want to freeze the weights of the network. Apart from freezing the weight and bias of batch norm, I would like also to freeze the running_mean and running_std and use the values from the pretrained network. I 've seen many posts that address this issue, but there is not clear answer. The general answer is to put the batchnorm layers in eval mode. But people report that if you first put your whole model in train mode and after that only the batchnorm layers in eval mode, training is not converging. Another post suggests to override the train() function by putting the batchnorm layers in eval mode inside train(). Is this the way to go? Does anyone have to suggest a better way? Thank you.