Closed Nianzhen-GU closed 3 years ago
@Nianzhen-GU
Hi, you can simply change the parameters of the upsampling module.
The original upsampler is:
up = []
for _ in range(int(math.log(self.scale,2))):
up.append(nn.Conv2d(fn, 4*fn, 3, 1, 1, bias=True))
up.append(nn.PixelShuffle(2))
up.append(nn.ReLU(inplace=True))
self.upsampler = nn.Sequential(*up)
You can change it to:
up = []
for _ in range(int(math.log(self.scale,3))):
up.append(nn.Conv2d(fn, 9*fn, 3, 1, 1, bias=True))
up.append(nn.PixelShuffle(3))
up.append(nn.ReLU(inplace=True))
self.upsampler = nn.Sequential(*up)
Thanks for answering! I have changed the parameters. However, I still encounter some errors. It is totally OK when I train 2X ATO network. But when I change all the parameters to 3, it will show the below error.
@Nianzhen-GU
You need to re-prepare the training data, and name the LR data as 'img_LR_3' in the H5 file.
I still faced some problems. After I changed the scale to 3, it cannot fix to 64.
@Nianzhen-GU
Simply change the patch size to make it divisible by 3.
Problem solved, thanks!
Is it possible that simply change scale = 3 to train the new model?