sanghyun-son / EDSR-PyTorch

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

I have a new problem about a new error : AttributeError: 'ModuleList' object has no attribute 'module' #63

Open thirteenbird opened 6 years ago

thirteenbird commented 6 years ago

After i run the code, cmd write out: Making model... Preparing loss function: 1.000 * L1 Traceback (most recent call last): File "main.py", line 19, in t.train() File "/home/ubuntu/Desktop/EDSR-PyTorch-2/src/trainer.py", line 34, in train self.loss.step() File "/home/ubuntu/Desktop/EDSR-PyTorch-2/src/loss/init.py", line 87, in step for l in self.get_loss_module(): File "/home/ubuntu/Desktop/EDSR-PyTorch-2/src/loss/init.py", line 123, in get_loss_module return self.loss_module.module File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 518, in getattr type(self).name, name)) AttributeError: 'ModuleList' object has no attribute 'module'

i don't know why it comes out this problem

sanghyun-son commented 6 years ago

Hello.

Did you set --n_GPUs larger than 1?

Please let me know the input argument you used to execute the code.

Thank you.

thirteenbird commented 6 years ago

I didn't change the setting of --n_GPUs, so it isn't larger than 1. i just use this : python main.py --model EDSR --scale 2 --patch_size 96 --save EDSR_baseline_x2 --reset --cpu and run

thirteenbird commented 6 years ago

I only modified the places you said need to be modified, only --dir_data and --ext.

sanghyun-son commented 6 years ago

Can I ask your OS and PyTorch version?

I checked that --cpu works well with my environment (Ubuntu 16.04, PyTorch 0.4.1)