torch.Tensor.int
-
Tensor.int(memory_format=torch.preserve_format) → Tensor -
self.int()эквивалентноself.to(torch.int32). См.to().- Параметры:
-
memory_format (
torch.memory_format, необязательный) – желаемый формат памяти возвращаемого тензора. По умолчанию:torch.preserve_format.
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.Tensor.int.html