PyTorch and other frameworks only complain if the dimensions don’t match expected values. Apart from that, anything goes and there’s always the chance that the network learns at least something. It just doesn’t mean that it’s something meaningful. Here just some food for thoughts and steps I would try:

When you say the network trains fine, what does that mean. Only the training loss going down is not a sufficient metric. How about the test loss/accuracy.

pack_padded_sequence also has batch_first as optional parameter. Did you try various combinations of True/False together with oyr definition of GRU. Intuitively, both should have the same value values for batch_first.

pack_padded_sequence also has the optional parameter enforce_sorted which is by default False. In this case, the method expects the input sorted w.r.t. the the lengths of the sequences. I cannot see in your code where you sort your input.