Hi there,
I have a problem with LSTMs. I need to get the cell states out of a LSTM for each time step. Unfortunaly it is only possible to get the output for each time step with return_sequences=True. return_state=True only gives me the cell state for the last time step...
Is there any hack/modification to get the cell states for each time step?
Greetings
This would be very helpful. We could (in combination with the LSTMVis project) visualize hidden state values in a reasonable manner.
Is it the hidden cell-state you are looking for? Example on how to get it:
lstm1, state_h, state_c = LSTM(1, return_state=True)
Deeper guide: https://machinelearningmastery.com/return-sequences-and-return-states-for-lstms-in-keras/
Yes, this is the cell state I am looking for, but not only. This parameter allows me to get the cell-state of the last time step, but not over all time steps like the output with return_sequences=True.
Most helpful comment
Yes, this is the cell state I am looking for, but not only. This parameter allows me to get the cell-state of the last time step, but not over all time steps like the output with
return_sequences=True.