r"""See :func:`torch.split`
(self, split_size, dim=0)
| 879 | return Resize.apply(self, tensor.size()) |
| 880 | |
| 881 | def split(self, split_size, dim=0): |
| 882 | r"""See :func:`torch.split`""" |
| 883 | if has_torch_function_unary(self): |
| 884 | return handle_torch_function( |
| 885 | Tensor.split, (self,), self, split_size, dim=dim |
| 886 | ) |
| 887 | if isinstance(split_size, Tensor): |
| 888 | try: |
| 889 | split_size = int(split_size) |
| 890 | except ValueError: |
| 891 | pass |
| 892 | |
| 893 | if isinstance(split_size, (int, torch.SymInt)): |
| 894 | return torch._VF.split(self, split_size, dim) # type: ignore[attr-defined] |
| 895 | else: |
| 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. |