Skip to content

Commit

Permalink
Merge pull request #3186 from google:fix-rnn-docs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 546391233
  • Loading branch information
Flax Authors committed Jul 7, 2023
2 parents 0734d00 + aac2f05 commit eb1c5ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions flax/linen/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
Carry = Any
CarryHistory = Any
Output = Any
NEVER = object()

class _Never:
pass

NEVER = _Never()

LEGACY_UPDATE_MESSAGE = (
"The RNNCellBase API has changed, "
Expand Down Expand Up @@ -649,8 +653,6 @@ class RNN(Module):
Attributes:
cell: an instance of :class:`RNNCellBase`.
cell_size: the size of the cell as requested by :meth:`RNNCellBase.initialize_carry`,
it can be an integer or a tuple of integers.
time_major: if ``time_major=False`` (default) it will expect inputs with shape
``(*batch, time, *features)``, else it will expect inputs with shape ``(time, *batch, *features)``.
return_carry: if ``return_carry=False`` (default) only the output sequence is returned,
Expand Down

0 comments on commit eb1c5ee

Please sign in to comment.