The PyTorch chatbot tutorial 1 implements Luong attention and getting the encoder’s hidden state via:
# Set initial decoder hidden state to the encoder's final hidden state
decoder_hidden = encoder_hidden[:decoder.n_layers]

I believe it must be decoder_hidden = encoder_hidden[-decoder.n_layers:] if it want to extract the last hidden state of last stacked LSTM. Am I missing something?