Closed Rainyliuliu closed 5 years ago
@Rainyliuliu Thanks for your interest. You can rename MODEL
to make_model
here to train.
https://github.com/JiahuiYu/wdsr_ntire2018/blob/a4a7ade1b72bac4f49fd6e28d0c4c74d449c5e8b/wdsr_a.py#L26
Thank you very much!And i have another question. i add : parser.add_argument('--r_mean', type=int,default=0.4488) parser.add_argument('--g_mean', type=int,default=0.4371) parser.add_argument('--b_mean', type=int,default=0.4040) parser.add_argument('--n_resblocks', type=int, default=32, help='number of residual blocks') parser.add_argument('--n_feats', type=int, default=256, help='number of feature maps') parser.add_argument('--block_feats', type=int,default=256) parser.add_argument('--patch_size', type=int, default=192, help='output patch size') to option.py ,and there is another error :+1: RuntimeError: input and target shapes do not match: input [16 x 3 x 176 x 176], target [16 x 3 x 192 x 192] at /pytorch/ate
i think in there def forward(self, x): x = (x - self.rgb_mean.cuda()*255)/127.5 if not self.training: x = self.pad(x) s = self.skip(x) x = self.head(x)
x = self.body(x)
x = self.tail(x)
x += s
x = x*127.5 + self.rgb_mean.cuda()*255
return x
s is 176*176 ,but i don't know why
@Rainyliuliu Sorry we missed it. You can either:
or :
hr
to the shape of prediction sr
.I think both paddings of https://github.com/JiahuiYu/wdsr_ntire2018/blob/a4a7ade1b72bac4f49fd6e28d0c4c74d449c5e8b/wdsr_a.py#L57 , and https://github.com/JiahuiYu/wdsr_ntire2018/blob/a4a7ade1b72bac4f49fd6e28d0c4c74d449c5e8b/wdsr_a.py#L62 should be changed to 2.
@YongboLiang We have explicit padding here. https://github.com/JiahuiYu/wdsr_ntire2018/blob/a4a7ade1b72bac4f49fd6e28d0c4c74d449c5e8b/wdsr_a.py#L79
there is a RuntimeError: The expanded size of the tensor (188) must match the existing size (192) at non-singleton dimension 3
@wangmenglu Have you modified any thing in our models? It should be fine to run without modification.
@wangmenglu Have you modified any thing in our models? It should be fine to run without modification.
I didn't modified anything.
Sorry it seems you will need to crop target HR patch to the output size in the main training loop. The reason is because we did not use padding in last convolution. Instead we only pad during testing.
The explicit padding has very close performance in our experiments. Thus we will remove it soon. Apologize for inconvenience and thanks for reporting.
We have removed explicit padding. Sorry again for the inconvenience.
Hi,when i run main.py ,there is an AttributeError: module 'model.wdsr_a' has no attribute 'make_model'