deepinsight / deepinsight/insightface

The effect of pytorch checkpoint to running mean/var in Batchnorm Layer

Open
#2,053 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.