The output of an nn.LSTM is output, (h_n, c_n) with the following shapes


output.shape: (seq_len, batch, num_directions * hidden_size)

h_n.shape:  (num_layers * num_directions, batch, hidden_size)

c_n.shape:  (num_layers * num_directions, batch, hidden_size)

That means that output contains the full sequence as indicated by seq_len.