Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions flax/linen/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def __call__(self, carry, inputs):
r"""A long short-term memory (LSTM) cell.

Args:
carry: the hidden state of the LSTM cell,
carry: a tuple ``(c, h)`` of the cell state ``c`` and the hidden
state ``h``, both of shape ``(*batch, features)``. Typically
initialized using ``LSTMCell.initialize_carry``.
inputs: an ndarray with the input for the current time step.
All dimensions except the final are considered batch dimensions.
Expand Down Expand Up @@ -285,8 +286,9 @@ def __call__(
r"""An optimized long short-term memory (LSTM) cell.

Args:
carry: the hidden state of the LSTM cell, initialized using
``LSTMCell.initialize_carry``.
carry: a tuple ``(c, h)`` of the cell state ``c`` and the hidden
state ``h``, both of shape ``(*batch, features)``. Typically
initialized using ``OptimizedLSTMCell.initialize_carry``.
inputs: an ndarray with the input for the current time step. All
dimensions except the final are considered batch dimensions.

Expand Down
8 changes: 5 additions & 3 deletions flax/nnx/nn/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ def __call__(
r"""A long short-term memory (LSTM) cell.

Args:
carry: the hidden state of the LSTM cell,
carry: a tuple ``(c, h)`` of the cell state ``c`` and the hidden
state ``h``, both of shape ``(*batch, features)``. Typically
initialized using ``LSTMCell.initialize_carry``.
inputs: an ndarray with the input for the current time step.
All dimensions except the final are considered batch dimensions.
Expand Down Expand Up @@ -382,8 +383,9 @@ def __call__(
r"""An optimized long short-term memory (LSTM) cell.

Args:
carry: the hidden state of the LSTM cell, initialized using
``LSTMCell.initialize_carry``.
carry: a tuple ``(c, h)`` of the cell state ``c`` and the hidden
state ``h``, both of shape ``(*batch, features)``. Typically
initialized using ``OptimizedLSTMCell.initialize_carry``.
inputs: an ndarray with the input for the current time step.
All dimensions except the final are considered batch dimensions.

Expand Down