-
Notifications
You must be signed in to change notification settings - Fork 143
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
Demo error - 'BatchNorm2d' object has no attribute 'track_running_stats' #36
Comments
In the mean time i started training the model myself on the dataset with python3 and pytorch 0.5. I can load the model and do the forward pass without getting the track_running_stats missing error. |
"train_params = [x for x in model.parameters() if x.requires_grad] " |
Hi, |
The Problem is that higher torch versions use the attribute track_running_stats. But track_runninh_stats is a new attribute and by the time this model was trained it was not available. So you try loading a model without this Attribute with a pytorch version that needs that attribute. I couldn’t find a way to add this attribute to the already trained model that is why I trained my own model with a higher pytorch version so that the model includes the attribute. Hope I could help |
pytorch 0.3.1 works well on my computer. My configuration is Ubuntu 16.04, cuda 9.0, pytroch 0.3.1, python 2.7.15. |
I am facing the same problem ...is any can help me |
I believe you need to manually download an older version of pytorch like 0.3.0 or 0.3.1 |
Hi, |
Your model train by pytorch0.3.x, but run in pytorch > 0.4.0.
and
I have ran 0.3.1 model in pytorch0.4.1 and pytorch1.0.0. |
@heroinlin : I added the above code and a new error creeped in: I couldn't find any leads on this in google search. |
@chanduKichu I have met the same problem. Did you solve it? |
@chandiniRNair @wuzb19951013 I have the same error. Were you able to figure it out ? |
A working solution is to load the state_dict of the model with argument "strict=False". Example code as below: ckpt = torch.load(model_path) |
I got the error:
There is no answer to my error on google.
It works... |
Hi,
I'am using torch version 0.5 and i get that error in that line
output = model(input_var)
The error message looks like that:
I found that other repositories have similar issues when upgrading from torch 0.3 to 0.4:
kunglab/ddnn#2
And I checked the specific commit to find out how to solve this errorr: kunglab/ddnn@071c82f
But I couldn't find the right solution yet.
I would like to use the most recent torch version so downgrading is not really an option for me.
The text was updated successfully, but these errors were encountered: