nn.Embedding basically keeps your input dimensions and adds the embedding_dim to it.
So if you provide a two-dimensional input, you will get a three-dimensional output.
I’m not familiar with your example, but it looks like you transpose your input to get the dimensions [sequence, batch_size] and pass it into the embedding layer.
I would therefore correspond to the embedding_dim.