Pytorch-cyclegan-and-pix2pix: Why did you ignore the InstanceNorm in the first block of Unet?

Created on 4 Oct 2019  路  3Comments  路  Source: junyanz/pytorch-CycleGAN-and-pix2pix

Could you tell me any reason why do you ignore the instance norm in the fist down-sampling block in the unet? I have added the norm in the block but the performance worst

https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/blob/43521b0e670f5421487d8aaf3675786e177c72e6/models/networks.py#L514

Most helpful comment

If you use an instancenorm in the first layer, the color of the input image will be normalized and get ignored. For many applications, you may want to preserve the color of the input image.

All 3 comments

If you use an instancenorm in the first layer, the color of the input image will be normalized and get ignored. For many applications, you may want to preserve the color of the input image.

Great to know that. How about batch norm? Why I can still use batch norm in the first layer and the result does not reduce.

Secondly, if I add 3x3 convolution (without instance norm) before the first layer, so Can I use instance norm in the first layer?

Thirdly, I used instance norm in cyclegan (the instance has been ignored in the first layer as original paper). I meet the rectangular artifact in the generated image (right side). Do you know how to solve my artifact? The artifact is disappeared when I used batchnorm but the whole performance of instance norm still better than batch norm
Screenshot from 2019-10-04 15-59-45

(1) The batchnorm calculates the statistics over the entire dataset rather than an individual image. Therefore the color of each image is still preserved. (2) You can try it. We haven't tried it before. (3) I am not sure if it is related to normalization. Please see the discussion on checkboard artifacts for more details.

Was this page helpful?
0 / 5 - 0 ratings