rchavezj:

last time step the last hidden state too? Sorry I’m a noob who likes to ask a lot of questions.


This is not entirely true. The output of the network is different from the hidden state and cell state. The output does have the form of (seq_len, batch_num, num_directions x output_sz) when batch_first=False.
Unfortunately, the hidden and cell states returned are the final state from each layer in the stack, for each sample in the batch:(num_directionsxnum_layers, batch_sz, output_sz). e.g. during the inference of a batch with 2 input samples into a 5-layer bidir LSTM the hidden/cell states tensors would have a shape of (10, 2, output_dim).