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

How to train the model with the Adversarial Loss? #299

Open jiandandan001 opened 3 years ago

jiandandan001 commented 3 years ago

Hi, how to train the model with the Adversarial Loss? Could you give an example of the code? Thanks

jiandandan001 commented 3 years ago

I have the following problem. Do you know the reason? thanks


Preparing loss function: Traceback (most recent call last): File "code/main.py", line 21, in loss = loss.Loss(args, checkpoint) if not args.test_only else None File "/loss/init.py", line 36, in init module = import_module('loss.adversarial') File "anaconda3/envs/pytorch1.1python2.7/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "loss/adversarial.py", line 85 return dict(state_discriminator, state_optimizer) ^ SyntaxError: invalid syntax