leftthomas / ESPCN

A PyTorch implementation of ESPCN based on CVPR 2016 paper "Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About image normalization

YudeWang opened this issue · comments

Thanks for your work! But I have a tiny question for image normalization.

out_img_y *= 255.0

The output of model is in range [0,1], but I didn't find the normalization for input and target during training, which are loaded from file in range [0, 255]. Then there will be some trouble for the loss between model output and the target. Can you help me to figure out where is the normalization for the input and target to change the range from [0, 255] into [0,1]?

@YudeWang

image = Variable(ToTensor()(y)).view(1, -1, y.size[1], y.size[0])

You need learn PyTorch better