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

Hidden Size Error #22

Open
Brandon-EME opened this issue Sep 19, 2024 · 2 comments
Open

Hidden Size Error #22

Brandon-EME opened this issue Sep 19, 2024 · 2 comments

Comments

@Brandon-EME
Copy link

Hi,

Apologies if this question seems rudimentary however when running train.py I am getting a hidden state size error for the RNN module within torch.nn. Reviewing the code it seems that the hidden state size defined in forward is based on the previous state, rather than the output required for the current state, is this correct. I'm quite surprised this issue isn't present for anyone else as it occurs just by my running train.py so don't know if I am misunderstanding something or if there is a version error somewhere.

Error in Ipython terminal:

File ~\AppData\Local\anaconda3\envs\ntmselfbuild\Lib\site-packages\torch\nn\modules\rnn.py:260 in check_hidden_size
raise RuntimeError(msg.format(expected_hidden_size, list(hx.size())))

RuntimeError: Expected hidden[0] size (1, 1, 100), got [1, 1, 29]

Many thanks.

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
@Brandon-EME and others