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

AttributeError: 'SGD' object has no attribute 'defaults' #77

Closed
SnowRipple opened this issue Oct 21, 2019 · 3 comments
Closed

AttributeError: 'SGD' object has no attribute 'defaults' #77

SnowRipple opened this issue Oct 21, 2019 · 3 comments

Comments

@SnowRipple
Copy link

Updated the container to 19.09 but I am still seeing this error:

Traceback (most recent call last): File "retinanet/convert_model.py", line 6, in <module> model.save(state=state,save_path="models/16_classes/up_included_900k_bgr.pth") File "/opt/conda/lib/python3.6/site-packages/retinanet-0.1-py3.6-linux-x86_64.egg/retinanet/model.py", line 184, in save torch.save(checkpoint, save_path) File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 224, in save return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol)) File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 149, in _with_file_like return body(f) File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 224, in <lambda> return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol)) File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 296, in _save pickler.dump(obj) File "/opt/conda/lib/python3.6/site-packages/torch/optim/optimizer.py", line 55, in __getstate__ 'defaults': self.defaults, AttributeError: 'SGD' object has no attribute 'defaults'

@ghost
Copy link

ghost commented Oct 21, 2019

@SnowRipple did you checkout the 19.09 branch before pip install?
branch can be checked out by git checkout -t origin/19.09 at git folder root.

@ghost
Copy link

ghost commented Nov 8, 2019

@SnowRipple is your problem fixed?

@SnowRipple
Copy link
Author

@yashnv Yes, I just commented out the line in pytorch... checking out the 19.09 branch didn't help. Can close now :)

@ghost ghost closed this as completed Nov 8, 2019
This issue was closed.
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

1 participant