捷徑

torch.Tensor.int

Tensor.int(memory_format=torch.preserve_format) Tensor

self.int() 等同於 self.to(torch.int32)。請參閱 to()

參數

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

文件

存取 PyTorch 的完整開發人員文件

檢視文件

教學

取得初學者和進階開發人員的深入教學

檢視教學

資源

尋找開發資源並取得問題解答

檢視資源