torch.cpu.set_device¶ torch.cpu.set_device(device)[source][source]¶ 設定當前裝置,在 CPU 上我們不執行任何操作。 注意:此函式僅用於簡化裝置無關程式碼的實現