I had a partially wrong understanding of the ‘stateful‘ option in LSTM while learning Keras. To confirm my knowledge, I did some searching and experimentation to make things clear. I have summarized my findings below. The source code is accessible in this Bitbucket repository. I would advise taking my conclusions with a grain of salt…