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

LSTM's forward function not work with null hidden and cell state #525

Closed
Leo-LiHao opened this issue Feb 18, 2022 · 2 comments · Fixed by #533
Closed

LSTM's forward function not work with null hidden and cell state #525

Leo-LiHao opened this issue Feb 18, 2022 · 2 comments · Fixed by #533

Comments

@Leo-LiHao
Copy link
Contributor

Hi, I'm implementing an example of using LSTM, however, I found that if I pass null h0_c0 to 'LSTM.forward' there will raise an exception like:

Unhandled exception. System.Runtime.InteropServices.ExternalException (0x80004005): Expected hidden[0] size 1 128 512, got [0]

@NiklasGustafsson
Copy link
Contributor

@Leo-LiHao -- can you paste the code of the model (not the whole training code) here?

NiklasGustafsson added a commit to NiklasGustafsson/TorchSharp that referenced this issue Feb 23, 2022
@NiklasGustafsson
Copy link
Contributor

@Leo-LiHao -- can you paste the code of the model (not the whole training code) here?

No need -- this was easily reproduced: just go with the defaults... :-)

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.

2 participants