sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.42k stars 668 forks source link

test error on EDSR_x4 model #29

Closed YOCB closed 6 years ago

YOCB commented 6 years ago

I running the test code (pytorch version 0.4.0) with this line python3 main.py --data_test Demo --scale 4 --n_resblocks 32 --n_feats 256 --res_scale 0.1 --pre_train ../experiment/model/EDSR_x4.pt --test_only --save_results

I get the following error:

Traceback (most recent call last): File "main.py", line 18, in while not t.terminate(): File "/home/yochai/models/EDSR/EDSR-PyTorch-master/code/trainer.py", line 136, in terminate self.test() File "/home/yochai/models/EDSR/EDSR-PyTorch-master/code/trainer.py", line 88, in test for idximg, (lr, hr, filename, ) in enumerate(tqdm_test): File "/usr/local/lib/python3.5/dist-packages/tqdm/_tqdm.py", line 941, in iter for obj in iterable: File "/home/yochai/models/EDSR/EDSR-PyTorch-master/code/dataloader.py", line 133, in iter return MSDataLoaderIter(self) File "/home/yochai/models/EDSR/EDSR-PyTorch-master/code/dataloader.py", line 114, in init self._put_indices() File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 298, in _put_indices self.index_queues[self.worker_queue_idx].put((self.send_idx, indices)) AttributeError: 'MSDataLoaderIter' object has no attribute 'index_queues' Exception ignored in: <bound method _DataLoaderIter.del of <dataloader.MSDataLoaderIter object at 0x7f74abd3c278>> Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 349, in del self._shutdown_workers() File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 323, in _shutdown_workers for q in self.index_queues: AttributeError: 'MSDataLoaderIter' object has no attribute 'index_queues'

I would appreciate help with this. Thanks!

sanghyun-son commented 6 years ago

I fixed my code for the PyTorch 0.4.0! Please check it.

Thank you.

YOCB commented 6 years ago

Thanks! Works perfectly now.