Alan-xw / RealSR

[Unofficial implementation] Toward Real-World Single Image Super-Resolution: A New Benchmark and A New Model (ICCV 2019)
81 stars 11 forks source link

How to do test when I add model/realsr into original edsr-pytorch repo? #12

Closed Senwang98 closed 3 years ago

Senwang98 commented 3 years ago

Hi, @Alan-xw I didn't use your repo to train realsr, I used original edsr-pytorch instead. I first pre-upscale the input x so that the output size is original size * args.scale. the training process is ok, but when test PSNR on Set5 each epoch, something wrong happened.

model/common.py", line 39, in _space_to_channel
    x = x.contiguous().view(b, C, hout, scale, wout, scale)
RuntimeError: shape '[1, 4, 65, 4, 67, 4]' is invalid for input of size 280800
Senwang98 commented 3 years ago

When I do test, if the input size of X is (260,270), then 270 % 4 != 0. You know how to solve this problem?

Songtingt commented 3 years ago

When I do test, if the input size of X is (260,270), then 270 % 4 != 0. You know how to solve this problem?

hello, i have the same question, have you solved it?