#1168·tflearn

LSTM stateful?

Author: Lukas3226Created May 25, 2022Updated May 25, 2022

In keras, there is the option to specify whether the lstm is stateful and the next batch continues the previous sequence or not.

How are the lstm in tflearn handelt?

When I start prediction with data of shape (1, 1, 10) and pass afterwards new data of shape (1, 1, 10), will the lstm take this as (1, 2, 10) data and continue the sequence or does it take it as passing (2, 1, 10) and think it is a new training sequence with timesteps 1.

I'm in a reinforcement setting and can only pass my time series one timestep at a time, so I need to know if I can achieve this using tflearn or if I need to keep track of the state of the lstm. Also, keras requires the initial_state during calling the lstm, not at creation. This also seems to not be the case here.