torch.mtia.set_device¶ torch.mtia.set_device(device)[來源][來源]¶ 設定目前的裝置。 參數 device (torch.device 或 int) – 選取的裝置。如果此引數為負數,則此函數不執行任何操作。