torch.Tensor.long
¶
- Tensor.long(memory_format=torch.preserve_format) Tensor ¶
self.long()
等价于self.to(torch.int64)
。请参阅to()
。- 参数
memory_format (
torch.memory_format
, 可选) – 返回张量所需的内存格式。默认值:torch.preserve_format
。
torch.Tensor.long
¶self.long()
等价于 self.to(torch.int64)
。请参阅 to()
。
memory_format (torch.memory_format
, 可选) – 返回张量所需的内存格式。默认值: torch.preserve_format
。