How do I deal with a batched pair of variable-length sequences?

They are padded separately. For example I have one tensor of [128x23] and another of [128x1592]. I have the original lengths and I want to unpad them using pack_padded_sequence.

Problem is I can’t guarantee both sequences will be of decreasing length, but the order also matters so I can’t unpair them.

What should I do? Thanks in advance!