Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Loss becomes NaN when setting use_global_stat=True for batchnorm #13902

Answered by zhujiagang
FCInter asked this question in Q&A
Discussion options

You must be logged in to vote

You can try to lower the learning rate to 1/10, 1/100 of the orginal value since when self.use_global_stats is True the model is not strictly zero centered and 1 variance, training is more difficult.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by szha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #13902 on September 05, 2020 19:29.