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

ImportError: cannot import name 'DataLoaderIter' #31

Closed
ABDOELSHEMY opened this issue Apr 26, 2018 · 3 comments
Closed

ImportError: cannot import name 'DataLoaderIter' #31

ABDOELSHEMY opened this issue Apr 26, 2018 · 3 comments

Comments

@ABDOELSHEMY
Copy link

hi @thstkdgus35
thank you for your great work in this project
i try to test with in windows
python main.py --data_test Demo --scale 4 --pre_train ../experiment/model/EDSR_baseline_x4.pt --test_only --save_results
but i get this erro

python main.py --data_test Demo --scale 4 --pre_train ../experiment/model/EDSR_baseline_x4.pt --test_only --save_resu
lts
Traceback (most recent call last):
File "main.py", line 4, in
import data
File "D:\EDSR PyTorch\code\data_init_.py", line 3, in
from dataloader import MSDataLoader
File "D:\EDSR PyTorch\code\dataloader.py", line 13, in
from torch.utils.data.dataloader import DataLoaderIter
ImportError: cannot import name 'DataLoaderIter'
Traceback (most recent call last):
File "main.py", line 4, in
import data
File "D:\EDSR PyTorch\code\data_init_.py", line 3, in
from dataloader import MSDataLoader
File "D:\EDSR PyTorch\code\dataloader.py", line 13, in from torch.utils.data.dataloader import DataL

how can i solve this please.

@hak23
Copy link

hak23 commented Apr 26, 2018

This is because of the pytorch update. DataLoaderIter was underscore suffixed to prevent subclassing. I think a quick non-code fix would be to move to pytorch 0.3.1, until it is fixed in this code, IMHO.

@sanghyun-son
Copy link
Owner

sanghyun-son commented Apr 26, 2018

As hak23 said, that error occurs due to the PyTorch update.

Fortunately, I pushed a commit for PyTorch 0.4.0 yesterday.

Although I did not test my code on Windows, I think it will work fine.

Thank you!

@ABDOELSHEMY
Copy link
Author

thank you @hak23 and @thstkdgus35 for your help
i use the last EDSR Project update, Unfortunately seem like we need some time to things works well in new PyTorch windows, thank you sir.

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

3 participants