-
Notifications
You must be signed in to change notification settings - Fork 188
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
Error when loading the model saved #20
Comments
I think you should load the model directly instead of the state_dict. The following worked for me: |
Hi,
I modified your code to train a model with my own dataset, and I am trying to load the model saved as "latest.pth" to do some tests. However, I am getting this error:
AttributeError: 'DenseNet' object has no attribute 'copy'
The code I use to load the model is:
net.load_state_dict(torch.load(checkpoint, map_location=lambda storage, loc: storage))
where checkpoint is the path to "latest.pth"
Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: