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

What param init defaults should we use #94

Closed
albertz opened this issue Jan 18, 2022 · 3 comments · Fixed by #103
Closed

What param init defaults should we use #94

albertz opened this issue Jan 18, 2022 · 3 comments · Fixed by #103
Milestone

Comments

@albertz
Copy link
Member

albertz commented Jan 18, 2022

Some options:

I collected some common options here: https://github.com/rwth-i6/returnn/wiki/Parameter-initialization

@albertz
Copy link
Member Author

albertz commented Feb 1, 2022

From other posts I read so far, it is claimed that Kaiming He (scale=2., mode="fan_in", distribution="normal") is currently the best practice.

However, I have not really seen that being used much in public setups. TF/Keras and other Google code often uses Glorot uniform. And this is also the default for the RETURNN (TensorFlow) LinearLayer.

@albertz
Copy link
Member Author

albertz commented Feb 2, 2022

From some Twitter discussion (via @lucasb-eyer):

Kaiming for CNNs with ReLUs, Xavier as a starting point for everything else.

I guess Xavier Glorot (scale=1.0, mode="fan_avg", distribution="uniform") is a good default choice for any tensors >= 2 dimensions, and just 0. for tensors <= 1 dimension.

@albertz
Copy link
Member Author

albertz commented Feb 2, 2022

Should our LSTM overwrite this?

This was referenced Feb 4, 2022
albertz added a commit that referenced this issue Feb 7, 2022
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

Successfully merging a pull request may close this issue.

1 participant