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

w_init in haiku.MultiHeadAttention.__init__ is not optional #535

Closed
Xin-yang-Liu opened this issue Sep 23, 2022 · 2 comments
Closed

w_init in haiku.MultiHeadAttention.__init__ is not optional #535

Xin-yang-Liu opened this issue Sep 23, 2022 · 2 comments

Comments

@Xin-yang-Liu
Copy link

In the current haiku document, the w_init is optional. However, when I try this, I got the error

Exception has occurred: ValueError
Please provide a weight initializer: `w_init`.
  • Haiku version 0.0.8.dev
  • jax 0.3.17
  • jaxlib 0.3.15+cuda11+cudnn8.2
@nlsfnr
Copy link
Contributor

nlsfnr commented Oct 13, 2022

This is because of this line here which does not allow w_init to be None, even though tat is its default value. This is because the w_init argument will eventually replace w_init_scale, however, for backwards compatibility, it has to have a default value for now. This can be quite confusing, so I added a brief explanation in the error message and additional documentation in this PR: #541.

@tomhennigan
Copy link
Collaborator

Fixed via #541.

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

3 participants