Rate this Page

torch.nn.utils.rnn.invert_permutation#

torch.nn.utils.rnn.invert_permutation(permutation)[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

Return type

Optional[Tensor]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources
Morty Proxy This is a proxified and sanitized view of the page, visit original site.