Lornatang / SRGAN-PyTorch

A simple and complete implementation of super-resolution paper.
Apache License 2.0
410 stars 105 forks source link

TypeError: preprocess_one_image() missing 2 required positional arguments: 'half' and 'device' #78

Closed yxh360680759 closed 1 year ago

yxh360680759 commented 1 year ago

python3 test.py Build srresnet_x4 model successfully. Load srresnet_x4 model weights /root/autodl-tmp/5-15-test/SRGAN-PyTorch/samples/SRGAN/g_last.pth.tar successfully. Processing /root/autodl-tmp/5-15-test/SRGAN-PyTorch/data/SET14/LRbicx4/baboon.png... Traceback (most recent call last): File "/root/autodl-tmp/5-15-test/SRGAN-PyTorch/test.py", line 103, in main() File "/root/autodl-tmp/5-15-test/SRGAN-PyTorch/test.py", line 75, in main lr_tensor = imgproc.preprocess_one_image(lr_image_path, srgan_config.device) TypeError: preprocess_one_image() missing 2 required positional arguments: 'half' and 'device'

yxh360680759 commented 1 year ago

range_norm=False, half=False, device=srgan_config.device