torch.Tensor.int Tensor.int(memory_format=torch.preserve_format) → Tensor self.int() is equivalent to self.to(torch.int32). See .