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
。
self.int()
等同于 self.to(torch.int32)
。详情请参见 to()
。
memory_format (torch.memory_format
, 可选) – 指定返回的张量的内存格式。默认值为:torch.preserve_format
。