When does keras reset an LSTM state?

后端 未结 5 1471
逝去的感伤
逝去的感伤 2020-11-28 04:23

I read all sorts of texts about it, and none seem to answer this very basic question. It\'s always ambiguous:

In a stateful = False LSTM layer, does ker

5条回答
  •  鱼传尺愫
    2020-11-28 04:49

    Everyone seems to be making it too confusing. Keras LSTM resets state after every batch.

    Here is a good blog: https://machinelearningmastery.com/understanding-stateful-lstm-recurrent-neural-networks-python-keras/

    Read LSTM State Within A Batch and Stateful LSTM for a One-Char to One-Char Mapping topics in this blog. It shows why it must reset it after batch only.

提交回复
热议问题