insightface
insightface copied to clipboard
The effect of pytorch checkpoint to running mean/var in Batchnorm Layer
Hi, I've read some discussion(https://discuss.pytorch.org/t/checkpoint-with-batchnorm-running-averages/17738) about pytorch checkpoint. The running mean/var of BN layer seems update twice when checkpoint is used in training. The way to make batch statistic updating correct is changing momentum to (1 - sqrt(1- original momentum)). In the recognition project, It seems that the checkpoint is simply used without changing BN momentum. Will this affect the model training? Is it necessary to change momentum manually? @anxiangsir