keras: Bug : Specifying initial state for Recurrent layers
There are 2 issues:
rnn = SimpleRNN(10) # Layer not built yet. So state_spec is None
x = Input((7, 5))
h_tm1 = Input((10,))
y = rnn(x, initial_state=h_tm1) # >> Error
Another issue is at : https://github.com/fchollet/keras/blob/master/keras/layers/recurrent.py#L236
if hasattr(initial_state, '_keras_history')
Doesn’t take into account when initial_state
is a list. (Such as in LSTM, which has multiple states).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 22 (11 by maintainers)
@xn8812 Great! Now you have hit a real bug. Will fix soon.
#6581
#6564