torch.cpu.is_available¶ torch.cpu.is_available()[原始碼][原始碼]¶ 返回一個布林值,指示 CPU 當前是否可用。 注意:此函式僅用於方便編寫與裝置無關的程式碼 返回型別 bool