快捷鍵

torch.get_device_module

torch.get_device_module(device=None)[原始碼][原始碼]

傳回與給定裝置相關聯的模組 (例如,torch.device('cuda'), “mtia:0”, “xpu”, …)。如果沒有給定裝置,則傳回目前加速器的模組;如果沒有加速器,則傳回 CPU 的模組。

文件

存取 PyTorch 的全面開發者文件

檢視文件

教學

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

檢視教學

資源

尋找開發資源並獲得解答

檢視資源