快捷方式

torch.get_device_module

torch.get_device_module(device=None)[source][source]

返回與給定裝置關聯的模組(例如,torch.device(‘cuda’),“mtia:0”,“xpu”,...)。如果沒有給出裝置,則返回當前加速器或 CPU(如果不存在)的模組。

文件

訪問 PyTorch 的完整開發者文件

檢視文件

教程

獲取適合初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源