Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why did you ignore the InstanceNorm in the first block of Unet? #782

Open
John1231983 opened this issue Oct 4, 2019 · 3 comments
Open

Comments

@John1231983
Copy link

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

down = [downrelu, downconv]

@junyanz
Copy link
Owner

junyanz commented Oct 4, 2019

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.

@John1231983
Copy link
Author

John1231983 commented Oct 4, 2019

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

@junyanz
Copy link
Owner

junyanz commented Oct 7, 2019

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants