評價此頁

torch.cpu.is_available#

torch.cpu.is_available()[原始碼]#

返回一個布林值,指示 CPU 當前是否可用。

注意:此函式僅用於方便裝置無關的程式碼

返回型別

布林值