My understanding is that in the Encoder Decoder LSTM, the decoder first state is same as the encoder final state (both hidden and cell states) . But I don't see that written explicitly in the code below (taken from many Keras tutorials).
model.add(LSTM(units, input_shape=(n_input, n_features),dropout=rdo, activation = keras.layers.LeakyReLU(alpha=0.2)))
model.add(RepeatVector(1))
model.add(LSTM(units, activation = keras.layers.LeakyReLU(alpha=0.2), return_sequences=True, dropout=rdo))
model.add(TimeDistributed(Dense(100, activation = keras.layers.LeakyReLU(alpha=0.2))))
model.add(TimeDistributed(Dense(n_features)))
Is this passing of states done automatically and at which stage?
Update: I think my assumption is probably not correct since this is a sequential architecture so only a single output is passed to the decoder layer. However, I am still wondering how not transferring the cell state and hidden state from the encoder to the decoder would still work ok (by work I mean produces a reasonable prediction?).