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

"func.running_mean" doesn't equal to the corrsponding "base.bn1.running_mean" in resnet? #10

Open
zouliangyu opened this issue Apr 16, 2018 · 2 comments

Comments

@zouliangyu
Copy link

hi, I have tranformed a caffe model from a pytorch model, after transformation, I compared all the correspoding parameters between caffe and pytorch. Conv layer's(weights, bias) and BN layer's scale parameters are all right, but the running_mean, running_var in pytorch are not corresponding to base.bn1.running_mean, base.bn1.running_var, may I ask do you know why, thank you @longcw !!!

@longcw
Copy link
Owner

longcw commented Jun 4, 2018

Did you add model.eval() like this https://github.com/longcw/pytorch2caffe/blob/master/pytorch2caffe.py#L394.
The running_mean will be updated in the training mode.

@zouliangyu
Copy link
Author

@longcw Oh yes, THANKS, I forgot to add it to fix the mean and var ...

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