Here is a sample code:
inputs = input(shape=shape)
encoder = LSTM(128)(inputs)
decoder = LSTM(128)(encoder)
Now, is the encoder
in decoder = LSTM(128)(encoder)
the hidden state or the input to the decoder?
If it is the hidden state, then encoder = LSTM(128)(inputs)
, here the inputs would also be passed as the hidden state, when we want it to pass as the input to the encoder and not the hidden state.
And If it is the input, then the model would be wrong as we want it to be the hidden state of the decoder, but all the people use the same code shown in the sample code and it works!