r"""Returns the unique elements of the input tensor. See :func:`torch.unique`
(self, sorted=True, return_inverse=False, return_counts=False, dim=None)
| 896 | return torch._VF.split_with_sizes(self, split_size, dim) |
| 897 | |
| 898 | def unique(self, sorted=True, return_inverse=False, return_counts=False, dim=None): |
| 899 | r"""Returns the unique elements of the input tensor. |
| 900 | |
| 901 | See :func:`torch.unique` |
| 902 | """ |
| 903 | if has_torch_function_unary(self): |
| 904 | return handle_torch_function( |
| 905 | Tensor.unique, |
| 906 | (self,), |
| 907 | self, |
| 908 | sorted=sorted, |
| 909 | return_inverse=return_inverse, |
| 910 | return_counts=return_counts, |
| 911 | dim=dim, |
| 912 | ) |
| 913 | return torch.unique( |
| 914 | self, |
| 915 | sorted=sorted, |
| 916 | return_inverse=return_inverse, |
| 917 | return_counts=return_counts, |
| 918 | dim=dim, |
| 919 | ) |
| 920 | |
| 921 | def unique_consecutive(self, return_inverse=False, return_counts=False, dim=None): |
| 922 | r"""Eliminates all but the first element from every consecutive group of equivalent elements. |