Skip to content

Commit

Permalink
Added to rnn statefulness doc concerning func api (keras-team#3375)
Browse files Browse the repository at this point in the history
Added correct information for how to enable rnn statefulness on functional models with 1 or more Input layers.
  • Loading branch information
chcaru authored and fchollet committed Aug 2, 2016
1 parent 6c42da2 commit cef9e28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion keras/layers/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ class Recurrent(Layer):
To enable statefulness:
- specify `stateful=True` in the layer constructor.
- specify a fixed batch size for your model, by passing
a `batch_input_shape=(...)` to the first layer in your model.
if sequential model:
a `batch_input_shape=(...)` to the first layer in your model.
else for functional model with 1 or more Input layers:
a `batch_shape=(...)` to all the first layers in your model.
This is the expected shape of your inputs *including the batch size*.
It should be a tuple of integers, e.g. `(32, 10, 100)`.
Expand Down

0 comments on commit cef9e28

Please sign in to comment.