Brando_Miranda:

pack_padded_sequence


The documentation still talk about sorting. Thus the issue seems unresolved, maybe the docs should be updated.
https://pytorch.org/docs/stable/nn.html#pack-padded-sequence 165

For unsorted sequences, use enforce_sorted = False. If  enforce_sorted  is  True , the sequences should be sorted by length in a decreasing order, i.e.  input[:,0]  should be the longest sequence, and  input[:,B-1]  the shortest one. enforce_sorted = True is only necessary for ONNX export.


git issue: https://github.com/pytorch/pytorch/issues/23079 120