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

How to handle BatchNorm ? #15

Open
heleifz opened this issue Sep 30, 2022 · 1 comment
Open

How to handle BatchNorm ? #15

heleifz opened this issue Sep 30, 2022 · 1 comment

Comments

@heleifz
Copy link

heleifz commented Sep 30, 2022

BatchNorm is very common in CV models, when training = True, the running statistics in BatchNorm layers is changing in every chunk.

@zzk2021
Copy link

zzk2021 commented Jan 26, 2023

There are no other ways unless you replace BN with GN.
I sightly think about the problem. The inconsistent mainly appends in forward process.
In each sub iteration, we can not get the statistics right. Because we can't get the next iteration‘s statistics. So we could not estimate statistics for the population.
I think we can cache output after BN layer. Like syncBN, we do synchronous. But it carrys a big cost.
If you have time, I would be pleasure to exchange views.

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

No branches or pull requests

2 participants