API symbolsnn
Copy
tensorplay.nn.utils.rnn.invert_permutation
- tensorplay.nn.utils.rnn.invert_permutation(permutation: TensorBase | None) TensorBase | None[source]
Returns the inverse of
permutation.This is useful for converting between sorted and unsorted indices in a
PackedSequence.- Parameters:
permutation (Tensor, optional) – a 1-D tensor of indices to invert
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
