Stream Output of Predictions in Keras

荒凉一梦 提交于 2019-12-03 06:48:23

You can enable statefulness in your LSTM layers by setting stateful=True. This changes the behavior of the layer to always use the state of the previous invocation of the layer instead of resetting it for each layer.call(x).

For example an LSTM layer with 32 units with batch size 1, sequence length 64 and feature length 10:

LSTM(32, stateful=True, batch_input_shape=(1,64,10))

With this successive calls of predict will use the previous states.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!