torch.Tensor.ndimension

Tensor.ndimension() int

dim() 的别名