torch.Tensor.short Tensor.short(memory_format=torch.preserve_format) → Tensor self.short() is equivalent to self.to(torch.int16). See .