znxlwm / pytorch-CartoonGAN

Pytorch implementation of CartoonGAN (CVPR 2018)
MIT License
386 stars 74 forks source link

VGG input #3

Closed ShuvenduRoy closed 6 years ago

ShuvenduRoy commented 6 years ago

https://github.com/znxlwm/pytorch-CartoonGAN/blob/fa4f9a335151d91b2afced9c1eb59679117300d7/CartoonGAN.py#L111

Why +1 and divide by 2 is used here??

znxlwm commented 6 years ago

range of x is -1 ~ 1. So, I used +1 and divide by 2 to normalize from -1 ~ 1 to 0 ~ 1.