Ah, sorry:

No, I did copy&paste. They are 2 different LSTMs
LSTMs are both LSTMs (nn.LSTM)
I did not put too much details, torch.cat is performed “correctly” so that the concatenated number of features match the expected input-size of the second LSTM. so basically,

torch.cat( [ word_embeddings[i,:,:], char_rep[i,:,:] ] )
is performed so that the result is 1 x batch_size x (<word_embedding-dim.> + <char_features-dim.>)
That makes sense ?
Thank you