torch.Tensor.half Tensor.half(memory_format=torch.preserve_format) → Tensor self.half() is equivalent to self.to(torch.float16). See .