快捷方式

torch.Tensor.float

Tensor.float(memory_format=torch.preserve_format) Tensor

self.float() 等同於 self.to(torch.float32)。請參閱 to()

參數

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

文件

存取 PyTorch 的完整開發者文件

查看文件

教學

獲取針對初學者和進階開發者的深入教學

查看教學

資源

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

查看資源