Bidirectional RNN output ordering

Hi folks, quick question:

The output of the bidirectional RNNs in pytorch have the dimension of 2*H, where H is the number of hidden units.

I understand that output[:, :, :H] will represent the forward RNN, while output[:, :, H:] represents the backward RNN.

However, what is the ordering of the backward output?
Is it (o1, o2, o3, …, oH) or is it (oH,…,o3, o3, o1)?

Thanks a bunch.

It depends on your notation:

do you mean o1_backward = F(i1_forward) or o1_backward = F(i1_backward) = F(iH_forward) ? :smiley:

in the case o1_backward = F(i1_backward), then it is (o1, o2, o3, …, oH)