pytorch-SRResNet icon indicating copy to clipboard operation
pytorch-SRResNet copied to clipboard

Change Upscale Value

Open niuqun opened this issue 6 years ago • 1 comments

Dear all, this project seems to fix its upscale to 4. When I changed the upscale value to 2 in the generate_train_srresnet.m, it runs into a RunTime Error:

RuntimeError: input and target shapes do not match: input [16 x 3 x 192 x 192], target [16 x 3 x 96 x 96] at /opt/conda/conda-bld/pytorch_1532579805626/work/aten/src/THCUNN/generic/MSECriterion.cu:12

Anyone has any ideas on how to make the upscale value adaptable? Thank you!

niuqun avatar Aug 30 '18 14:08 niuqun

Hi, since the model is trained for fixed upscale factor of 4, if you want to use it for other scales, you will have to train with different scales. Another choice would be using some self-adaptable approaches such as vdsr.

twtygqyy avatar Sep 30 '18 07:09 twtygqyy