In the
documentation on stateful RNNs, the following statement is made:
"Making a RNN stateful means that the states for the samples of each batch will be reused as initial states for the samples in the next batch."
Given K samples per batch:
Batch1 = [sample1, sample2, ..., samplek] producing [B1State1, B1State2, ..., B1StateK]
Batch2 = [sample1, sample2, ..., samplek] producing [B2State1, B2State2, ..., B2StateK]
Does that statement mean that the state B1State1 is used as the initial state for arriving at B2State1?
If that's the case, I am not able to follow the Stateful LSTM
example on Github: The shape of `cos` is (50000, 1, 1) and with a batch size of 25, the 26th "point" of the timeseries (i.e. the first sample of the second batch) will use the 1st point of the timeseries as the initial state. I would expect the initial state of the 26th point to be that of the 25th point...
Can someone please explain what's happening here? Thank you in advance.
KN.