lyndonzheng / Pluralistic-Inpainting

[CVPR 2019]: Pluralistic Image Completion
676 stars 145 forks source link

preprocess #38

Closed thinkerthinker closed 3 years ago

thinkerthinker commented 4 years ago

i'am confused about pre-process steps at pluralistic_model.py. at function set_input, why u use self.img_truth = self.img * 2 - 1? why not self.img_truth = self.img? is there any meanings for results?

lyndonzheng commented 4 years ago

@thinkerthinker This pre-process is for the image generation that normalizes the value to (-1,1). In this way, we can use the tanh function, which makes the generation more stable.

thinkerthinker commented 4 years ago

thank you for your quick reply!