快捷方式

torch.Tensor.short

Tensor.short(memory_format=torch.preserve_format) Tensor

self.short() 等同於 self.to(torch.int16)。請參閱 to()

引數

memory_format (torch.memory_format, optional) – 返回 Tensor 的期望記憶體格式。預設值: torch.preserve_format

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並解答問題

檢視資源