Resetting a cell with LSTM_cell = LSTM(n_a, return_state = True)
is only for debugging purpose. Please remove it when you complete implementation. Here is the thread related to this issue.
In your case, most likely “x
” is transformed incorrectly during iterations.
As you see there are multiple steps to transform “x
”. It is better for you to check dimensions of “x
” on each step, and see which code transforms it incorrectly.
In each iteration,
Input to LSTM_cell : x.shape = (None, 1, 90)
After argmax : x.shape = (None,)
After one_hot : x.shape = (None, 90)
After RepeatVector: x.shape = (None, 1, 90)
You see the shape of the output from the RepeatVector is identical to the input to the LSTM_cell. In you case, most likely those are not.
Hope this helps.