Hi, I’m building a model using Bidirectional GRU, so I use nn.GRU(bidirectional=True)
From the doc, I got it’s outputs are
Outputs: output, h_n
    - **output** (seq_len, batch, hidden_size * num_directions): tensor containing the output features h_t from
      the last layer of the RNN, for each t. If a :class:`torch.nn.utils.rnn.PackedSequence` has been given as the
      input, the output will also be a packed sequence.
    - **h_n** (num_layers * num_directions, batch, hidden_size): tensor containing the hidden state for t=seq_len


And the first dim of h_n is all GRU Cell. Because in the model, there are  (num_layers * num_directions) GRUCell.
But I wonder h_n is like
[
layer0_forward
layer0_backward
layer1_forward
layer1_backward
layer2_forward
layer2_backward
…
] or
[
layer0_forward
layer1_forward
layer2_forward
layer0_backward
layer1_backward
layer2_backward
…
]
Is anybody know it? Or how I can figure it out?