-
Notifications
You must be signed in to change notification settings - Fork 90
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
freeze_bn seems to be an invalid option #35
Comments
Hi, |
Hello, Thanks for your quick response. I did some checking but the results show that BN is in training mode. I made a fork to your repository and add some codes to check the running mean/var of bn during training, as here. However, with current implementation, the results show that the running mean is still being updated during training which means the BN is in train mode.
If I comment out
Would you please have a look at that? Or I missed something? |
ok, have you fixed the issue? |
Dear author,
I am trying to read and reproduce your codes, but I found some possible issue with batch normalization.
In current code, you define a
freeze_bn()
function to change all batch normalization layers toeval
mode, likeindexnet_matting/scripts/hlmobilenetv2.py
Line 824 in 4beb06a
But you neither rewrite the
train
function ofnn.Module
nor call this function every time before the training cycle.This means when
train()
function callnet.train()
, these BN layers becomes training mode again andfreeze_bn
actually takes no effect and all training is conducted under with BN enabled. Is this right?The text was updated successfully, but these errors were encountered: