Skip to content

Commit

Permalink
Update RNN doc on fixed batch size (re: #20327) (#20338)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcarp authored Oct 12, 2024
1 parent 8f5592b commit 1ffff04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keras/src/layers/rnn/rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ class RNN(Layer):
- Specify `stateful=True` in the layer constructor.
- Specify a fixed batch size for your model, by passing
If sequential model:
`batch_input_shape=(...)` to the first layer in your model.
Pass `batch_size=1` to `model.fit()` or use a dataset based on a
generator or `tf.data.Dataset`.
Else for functional model with 1 or more Input layers:
`batch_shape=(...)` to all the first layers in your model.
This is the expected shape of your inputs
Expand Down

0 comments on commit 1ffff04

Please sign in to comment.