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: 'collections.OrderedDict' object has no attribute 'to' #15

Open
asah opened this issue Dec 31, 2018 · 1 comment
Open

Comments

@asah
Copy link

asah commented Dec 31, 2018

~/super-resolution$ python3 super_resolve.py --model NTIRE2018_x8.pth --input bo-ky-soup.jpg
Namespace(input='bo-ky-soup.jpg', model='NTIRE2018_x8.pth', output='test.jpg')
Traceback (most recent call last):
File "super_resolve.py", line 34, in
model = model.to(device)
AttributeError: 'collections.OrderedDict' object has no attribute 'to'

~/super-resolution$ python3 -c "import torch;print(torch.version); import torch.backends.cudnn as cudnn;print(cudnn.version())"
1.0.0
7401

@Mondayyyy
Copy link

~/super-resolution$ python3 super_resolve.py --model NTIRE2018_x8.pth --input bo-ky-soup.jpg
Namespace(input='bo-ky-soup.jpg', model='NTIRE2018_x8.pth', output='test.jpg')
Traceback (most recent call last):
File "super_resolve.py", line 34, in
model = model.to(device)
AttributeError: 'collections.OrderedDict' object has no attribute 'to'

~/super-resolution$ python3 -c "import torch;print(torch.version); import torch.backends.cudnn as cudnn;print(cudnn.version())"
1.0.0
7401

I have the same problem.
Error: AttributeError: 'SRCNNTrainer' object has no attribute 'cuda'
Can you tell me how to resolve it?
Thank you for your help.

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