kekgle:

because when computing char embeddings I have to concatenate all words of all sentences in the batch to make the input 3D.


Are you sure you need to make the character input 3d ?
nn.Embedding is supposed to work with any input shape.