Improve LSTM documentation for proj_size > 0 (#65102)
authorRodrigo Berriel <rodrigo.berriel@gmail.com>
Thu, 16 Sep 2021 13:33:40 +0000 (06:33 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 16 Sep 2021 13:35:27 +0000 (06:35 -0700)
commit83878e19ff2af39443016beb31952476c9f049d0
tree14d229f93a942eb2209132f61a5f6b1faf7f306c
parentf69cf3cf2ff392d7791b7efbc069a66494492a77
Improve LSTM documentation for proj_size > 0 (#65102)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/65053. Although the documentation states that:

https://github.com/pytorch/pytorch/blob/fe0f9d1dafb9791cb08635636a01128850d17538/torch/nn/modules/rnn.py#L500-L506

It seems that the definition of `weight_ih_l[k]` could be improved by specifying what happens when `k > 0` and `proj_size > 0`. As `proj_size` is only used in LSTM, no changes are needed for the other RNNs.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/65102

Reviewed By: supriyar

Differential Revision: D30975781

Pulled By: jbschlosser

fbshipit-source-id: 12df06e5e6a8d5de0ad10fb15e33c3e6311c11d3
torch/nn/modules/rnn.py