-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Update rnn.py, fix torch.nn.RNN
document error
#153620
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153620
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit eadd6c0 with merge base 7482eb2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@pytorchbot label "documentation" |
Didn't find following labels among repository labels: documentation |
@pytorchbot label "module: docs" |
@pytorchbot label "module: nn" |
I found the same issue as #147490 (@jibril-b-coulibaly).
There's an equivalent in the doc-string of
torch.nn.RNN
:However there's something wrong.
pytorch/torch/nn/modules/rnn.py
Line 499 in fb55bac
The input for RNNCell should be different for different layers.
pytorch/torch/nn/modules/rnn.py
Line 504 in fb55bac
weight_ih
in line 499pytorch/torch/nn/modules/rnn.py
Line 499 in fb55bac
So, i write a runnable version to make it more clear:
This code can reproduce the computation of torch.nn.RNN.
For example:
cc @svekars @sekyondaMeta @AlannaBurke @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki