torch.Tensor.short¶
- Tensor.short(memory_format=torch.preserve_format) 张量¶
self.short()等同于self.to(torch.int16)。参见to()。- Parameters
memory_format (
torch.memory_format, 可选) – 返回的张量所需的内存格式。默认值:torch.preserve_format。
self.short() 等同于 self.to(torch.int16)。参见 to()。
memory_format (torch.memory_format, 可选) – 返回的张量所需的内存格式。默认值: torch.preserve_format。