評價此頁

torch.cpu.device_count#

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

返回 CPU 裝置(而非核心)的數量。始終為 1。

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

返回型別

int