Update recurrent.py.
Add explanation on shuffle=False.
@@ -128,19 +128,19 @@ class Recurrent(Layer):
# Note on using statefulness in RNNs
You can set RNN layers to be 'stateful', which means that the states
computed for the samples in one batch will be reused as initial states
- for the samples in the next batch.
- This assumes a one-to-one mapping between
- samples in different successive batches.
+ for the samples in the next batch. This assumes a one-to-one mapping
+ between samples in different successive batches.
To enable statefulness:
- specify `stateful=True` in the layer constructor.
- specify a fixed batch size for your model, by passing
if sequential model:
- a `batch_input_shape=(...)` to the first layer in your model.
+ `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.
+ `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)`.
+ - specify `shuffle=False` when calling fit().
To reset the states of your model, call `.reset_states()` on either
a specific layer, or on your entire model.
