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

Clarification for LSTMCell Documentation #4124

Open
corentinlger opened this issue Aug 12, 2024 · 2 comments
Open

Clarification for LSTMCell Documentation #4124

corentinlger opened this issue Aug 12, 2024 · 2 comments
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment.

Comments

@corentinlger
Copy link

Hello, I was trying to understand the LSTMCell of Flax. The documentation for the __call__ function says:

carry – the hidden state of the LSTM cell, initialized using LSTMCell.initialize_carry.

It thought it was weird that the cell state wasn't returned in addition with the hidden state. But in the source code, initialize_carry seems to return a tuple containing the cell and the hidden states :

return (c, h)

Additionally, the __call__ function seems to also returns both the cell state and the hidden state in the carry:

return (new_c, new_h), new_h

Did I misunderstand something? If not, should the documentation be updated to clarify that the carry includes both the cell state and the hidden state?

Anyway, thanks for the great library!

@cgarciae
Copy link
Collaborator

I agree that the docs should be a bit more clear with the structure of the LSTMCell's carry.

@cgarciae cgarciae added the Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment. label Aug 13, 2024
@corentinlger
Copy link
Author

Do you want me to do a PR for it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment.
Projects
None yet
Development

No branches or pull requests

2 participants