I’m trying to understand the mechanics of the LSTM in Pytorch and came across something that I believe has been asked & answered before but I have a follow-up.
A simple example is pasted below. I expected the final output to be a concatenation of the h_n contents.
But it seems like only the first half matches. From related posts, I see that I’m probably looking at the “first hidden state of the reverse sequence”.
My question : “Is there a way for me to access the last hidden state of the reverse sequence to verify that my ouput[5] is the concatenation of the hidden states?”

pytorch_question.png1074×596 56.6 KB

Thanks!