def _squeeze_(self, dim=None): """Inplace of ``Tensor.squeeze()`` Parameters ---------- dim : int The optional dim to remove. Returns ------- vm.torch.Tensor The self. """ return squeeze(self, dim=dim, out=self)
def _squeeze(self, dim=None): """Returns a tensor with all the dimensions of input of size 1 removed. Parameters ---------- dim : int The optional dim to remove. Returns ------- vm.torch.Tensor The new tensor. """ return squeeze(self, dim=dim)