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 zero initialize patch_out in hourglass transformer? #113

Open
Luciennnnnnn opened this issue Nov 3, 2024 · 1 comment
Open

Why zero initialize patch_out in hourglass transformer? #113

Luciennnnnnn opened this issue Nov 3, 2024 · 1 comment

Comments

@Luciennnnnnn
Copy link

Hi, Why zero initialize patch_out in hourglass transformer? It makes output zero in beginning, what's the intuition of it?

@madebyollin
Copy link

In general, you want to initialize neural net outputs to the mean of the target distribution, so the model doesn't need to waste time learning the mean. See "init well" here. For standard diffusion training, the target distribution is zero-centered so the network outputs should be zero at init.

This approach is used in DDPM, ADM, DiT, etc.

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