torch.cpu.device_count¶ torch.cpu.device_count()[source][source]¶ 返回 CPU 裝置數量(非核心數)。始終為 1。 注意:此函式僅用於方便編寫裝置無關的程式碼 返回型別 int