From the docs:

input of shape (seq_len, batch, input_size): tensor containing the features of the input sequence. The input can also be a packed variable length sequence. See torch.nn.utils.rnn.pack_padded_sequence() 1 for details.

So indeed a 3-dimensional input tensor is expected in the mentioned shape.