Nikos_Spanos:

embedded = torch.mean(embedded, dim=1, keepdim=True)


This line is weird. Do you really want to mean over the tokens (dim=1) before putting it into an RNN?
In any case,



 Nikos_Spanos:

packed_embedded = nn.utils.rnn.pack_padded_sequence(embedded, text_lengths, batch_first=True)


is going to be wrong, because batch_first means from 32x1x100 you have a batch of size 1, so the second args should be a vector of dim 1. and I can expect that text_lengths does not have that dimension.