sort¶
dragon.vm.torch.
sort
(
input,
dim=- 1,
descending=False,
out=None
)[source]¶Return the sorted elements along the given dimension.
By default, the last dimension is chosen:
Sort in the descending order if
descending
isTrue
:- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- dim (int, optional, default=-1) – The dimension to sort elements.
- descending (bool, optional, default=False) – Sort in the descending order or not.
- out (Sequence[dragon.vm.torch.Tensor], optional) – The optional output value and index.
- Returns:
Sequence[dragon.vm.torch.Tensor] – The value and index tensor.