Lotayou / Face-Renovation

Official repository of the paper "HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment".
https://arxiv.org/abs/2005.05005
GNU General Public License v3.0
284 stars 49 forks source link

About instancenorm2d #24

Closed ryanxingql closed 3 years ago

ryanxingql commented 3 years ago

Dear author

I notice that nn.InstanceNorm2d is used without setting affine=True. In this case, the affine transform is not learnable.

I'm wondering that is it good for image generation? How about setting affine=True just like batch norm does?

btw: in Class SimplifiedLIP, affine=True.

https://github.com/Lotayou/Face-Renovation/blob/2e55e1563d52c6cfb2bbd98c915ae95f566f416d/models/networks/generator.py#L259-L299

Lotayou commented 3 years ago

Hey I guess you have a point, this could indeed make a difference (if not a huge one). Guess I'll double check on this one later:) Feel free to submit a PR if you find this effective.

ryanxingql commented 3 years ago

Thanks for your response. I'll give it a try later.