Keras: Saving and restoring memory state

Created on 11 Mar 2016  路  2Comments  路  Source: keras-team/keras

Is it possible to save memory state in LSTM and restore its value to the model when it is needed?

Most helpful comment

Yes. The states attribute in a recurrent layer is a list of states, you can call K.set_value(lstm.states[i], val) or K.get_value(lstm.states[i]) on them.

All 2 comments

Yes. The states attribute in a recurrent layer is a list of states, you can call K.set_value(lstm.states[i], val) or K.get_value(lstm.states[i]) on them.

wow this took me only a week to find out lol. but that's great.

Was this page helpful?
0 / 5 - 0 ratings