Solved by vdw in post #2 
              
              
                If you look at the docs, you can resolve the num_layers*num_directions with 
h = h.view(num_layers, num_directions, batch, hidden_size)

After that, the last layer is simply h[-1], the last layer for the forward pass is h[-1][0], and the last layer for the backward pass is h[-1][1]. 
Does this answe…