torch.mtia.set_device¶ torch.mtia.set_device(device)[原始碼][原始碼]¶ 設定當前裝置。 引數 device (torch.device 或 int) – 選擇的裝置。如果此引數為負數,則此函式不執行任何操作(no-op)。