ImportError: cannot import name '_worker_manager_loop'

Asked 2 years ago, Updated 2 years ago, 41 views

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    import data
  File "D:\EDSR-PyTorch-master\src\data\_init__.py", line 2, in <module>
    from dataloader import MSDataLoader
  File "D:\EDSR-PyTorch-master\src\dataloader.py", line 17, in <module>
    from torch.utils.data.dataloader import_worker_manager_loop
ImportError: cannot import name '_worker_manager_loop'

You are about to run training on a super-resolution network.
URL: https://github.com/thstkdgus35/EDSR-PyTorch
The above error statement appears.
When I looked into it, I found similar errors such as duplicate file names.
I thought it didn't apply. So I need your help.

python python3

2022-09-29 22:21

1 Answers

This issue was discussed in this issue of EDSR-PyTorch: https://github.com/thstkdgus35/EDSR-PyTorch/issues/98

The reason for the error is that the internal implementation changed from PyTorch v1.0rc0 and torch.utils.data.dataloader._worker_manager_loop was deleted (named).Originally, EDSR-PyTorch was tested with PyTorch>=0.4.0, and it seemed to work well with 0.4.0, but it didn't follow PyTorch's changes and led to this ImportError.

This is accompanied by a change that follows PyTorch 1.0.0 on the EDSR-PyTorch side, so this error should not occur with the current latest version of EDSR-PyTorch.You can also use PyTorch>=0.4.0&<1 because the legacy branch still contains code from the 0.4.0 era.


2022-09-29 22:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.