Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions torch/nn/modules/rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ class RNN(RNNBase):
for details.
- **h_0** (num_layers * num_directions, batch, hidden_size): tensor
containing the initial hidden state for each element in the batch.
Defaults to zero if not provided.

Outputs: output, h_n
- **output** (seq_len, batch, hidden_size * num_directions): tensor
Expand Down Expand Up @@ -338,6 +339,8 @@ class LSTM(RNNBase):
- **c_0** (num_layers \* num_directions, batch, hidden_size): tensor
containing the initial cell state for each element in the batch.

If (h_0, c_0) is not provided, both **h_0** and **c_0** default to zero.


Outputs: output, (h_n, c_n)
- **output** (seq_len, batch, hidden_size * num_directions): tensor
Expand Down Expand Up @@ -412,6 +415,7 @@ class GRU(RNNBase):
for details.
- **h_0** (num_layers * num_directions, batch, hidden_size): tensor
containing the initial hidden state for each element in the batch.
Defaults to zero if not provided.

Outputs: output, h_n
- **output** (seq_len, batch, hidden_size * num_directions): tensor
Expand Down