Closed jayabrams closed 3 years ago
hello, I've tried to run inference using the test_image.py script but am receiving the following:
test_image.py
$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan_4x4_16 --upscale-factor 4 --pretrained --device 0 Receive the following error: usage: test_image.py [-h] --lr LR --hr HR [-a ARCH] [--upscale-factor {4}] [--model-path PATH] [--pretrained] [--detail] [--outf PATH] [--device DEVICE] test_image.py: error: argument -a/--arch: invalid choice: 'srgan_4x4_16' (choose from 'discriminator', 'load_state_dict_from_url', 'srgan', 'srresnet')
$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan_4x4_16 --upscale-factor 4 --pretrained --device 0
usage: test_image.py [-h] --lr LR --hr HR [-a ARCH] [--upscale-factor {4}] [--model-path PATH] [--pretrained] [--detail] [--outf PATH] [--device DEVICE] test_image.py: error: argument -a/--arch: invalid choice: 'srgan_4x4_16' (choose from 'discriminator', 'load_state_dict_from_url', 'srgan', 'srresnet')
I then attempted:
$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan --upscale-factor 4 --pretrained --device 0 Receive the following error: Traceback (most recent call last): File "test_image.py", line 65, in <module> estimate = Estimate(args) File "/home/user/SRGAN-PyTorch/tester.py", line 138, in __init__ self.model, self.device = configure(args) File "/home/user/SRGAN-PyTorch/srgan_pytorch/utils/common.py", line 56, in configure model = models.__dict__[args.arch](pretrained=True, upscale_factor=args.upscale_factor).to(device) TypeError: srgan() got an unexpected keyword argument 'upscale_factor'
$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan --upscale-factor 4 --pretrained --device 0
Traceback (most recent call last): File "test_image.py", line 65, in <module> estimate = Estimate(args) File "/home/user/SRGAN-PyTorch/tester.py", line 138, in __init__ self.model, self.device = configure(args) File "/home/user/SRGAN-PyTorch/srgan_pytorch/utils/common.py", line 56, in configure model = models.__dict__[args.arch](pretrained=True, upscale_factor=args.upscale_factor).to(device) TypeError: srgan() got an unexpected keyword argument 'upscale_factor'
Steps to reproduce on debian box: $ git clone https://github.com/Lornatang/SRGAN-PyTorch.git $ cd SRGAN-PyTorch/ $ pip3 install -r requirements.txt
@jayabrams I'm trying to train a new model. He's finished soon. Please wait. It is better.
@jayabrams This error is fixed.
hello, I've tried to run inference using the
test_image.py
script but am receiving the following:$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan_4x4_16 --upscale-factor 4 --pretrained --device 0
Receive the following error:usage: test_image.py [-h] --lr LR --hr HR [-a ARCH] [--upscale-factor {4}] [--model-path PATH] [--pretrained] [--detail] [--outf PATH] [--device DEVICE] test_image.py: error: argument -a/--arch: invalid choice: 'srgan_4x4_16' (choose from 'discriminator', 'load_state_dict_from_url', 'srgan', 'srresnet')
I then attempted:
$SRGAN-PyTorch$ python test_image.py --lr lr.png --hr hr.png -a srgan --upscale-factor 4 --pretrained --device 0
Receive the following error:Traceback (most recent call last): File "test_image.py", line 65, in <module> estimate = Estimate(args) File "/home/user/SRGAN-PyTorch/tester.py", line 138, in __init__ self.model, self.device = configure(args) File "/home/user/SRGAN-PyTorch/srgan_pytorch/utils/common.py", line 56, in configure model = models.__dict__[args.arch](pretrained=True, upscale_factor=args.upscale_factor).to(device) TypeError: srgan() got an unexpected keyword argument 'upscale_factor'
Steps to reproduce on debian box: $ git clone https://github.com/Lornatang/SRGAN-PyTorch.git $ cd SRGAN-PyTorch/ $ pip3 install -r requirements.txt