tsurumeso / waifu2x-chainer

Chainer implementation of waifu2x
MIT License
165 stars 54 forks source link

how to deal with variable input and output #8

Closed ghost closed 5 years ago

ghost commented 6 years ago

I learn about that the cnn can handle the variable input,but we want get the output sizes is different for different inputs.What can I do?

tsurumeso commented 6 years ago

waifu2x uses Fully Convolutional Networks (FCN). FCN that consists only of convolution layers just applies various filters to input image, so it can handle variable inputs.

ghost commented 6 years ago

I read your code then I found that you extract some patches from original image as inputs when tranning. I also found some other data processing method such as "array_to_wand" and "wand_to_array" in "iproc.py".I don't know why you convert data format at this.

tsurumeso commented 6 years ago

Original waifu2x uses GraphicksMagick that is a fork of ImageMagick to generate training data. So waifu2x-chainer uses Wand that is simple ImageMagick binding to reproduce the same result.

ghost commented 6 years ago

Oh,thanks,I an reading and testing the code then I understand the data-processing ,Now I have some trouble with ClippedWeightedHuberLoss(loss function),I can understand the forward function but I can‘t understand the backward function,so can you give me some inspiration。(My english is very poor,233)

tsurumeso commented 6 years ago

Definition is here.