Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve evaluation results for Batch norm #2108

Closed
astonzhang opened this issue Apr 21, 2022 · 4 comments
Closed

Improve evaluation results for Batch norm #2108

astonzhang opened this issue Apr 21, 2022 · 4 comments

Comments

@astonzhang
Copy link
Member

http://preview.d2l.ai.s3-website-us-west-2.amazonaws.com/d2l-en/master/chapter_convolutional-modern/batch-norm.html

The evaluation results of batch norm for all frameworks need improvements. For example, as the text states, the performance should be better than that of LeNet without BN. However, the training looks unstable as shown in the plots, such as in the plot of val_acc.

Screen Shot 2022-04-20 at 6 06 31 PM

Screen Shot 2022-04-20 at 6 06 47 PM

@astonzhang
Copy link
Member Author

@AnirudhDagar feel free to share your insight here while you're working on #2107 and #2099

@cheungdaven
Copy link
Member

@astonzhang I found that removing the batchnorm on the fully-connected layers can make the curve stable.

@astonzhang
Copy link
Member Author

@cheungdaven In fact, it seems that ResNet and DenseNet have similar issues:

http://preview.d2l.ai.s3-website-us-west-2.amazonaws.com/d2l-en/master/chapter_convolutional-modern/resnet.html
http://preview.d2l.ai.s3-website-us-west-2.amazonaws.com/d2l-en/master/chapter_convolutional-modern/densenet.html

although RegNet in PyTorch has smoother plots:
http://preview.d2l.ai.s3-website-us-west-2.amazonaws.com/d2l-en/master/chapter_convolutional-modern/cnn-design.html

Since ResNet and DenseNet do not apply BN on the FC layers in network heads, perhaps the plot issue is with somewhere else? Are you able to find any literature that supports removal of BN after FC layers? If not, could you try something else?

@AnirudhDagar
Copy link
Member

Closing this since it was fixed with the latest version of all the frameworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants