Computes the sequence lengths of a PackedSequence represented with batch_sizes.
Parameters:
batch_sizes (Tensor) – Contains the batch sizes as stored in a PackedSequence
Returns:
the length parameter used in the torch.nn.utils.rnn.packed_padded_sequence function
to create a PackedSequence. It’s a list of the same length as batch_sizes.