avalonstrel/GatedConvolution_pytorch

About load data.

waallf opened this issue · 1 comments

Thanks for your code. But I couldn't understand Why is the image normalized, then multiplied by 255, and then divided by 127.5.
In inpaint_dataset.py
'''
img = self.transforms_fun(img)
return img*255, masks,gt_masks,shape
'''
In train_sagan.py:
'''
imgs = (imgs / 127.5 - 1)

'''

the range of pixel value: (0,1) --->(0,255)--->(-1,1)