torch.cpu.device_count¶ torch.cpu.device_count()[原始碼][原始碼]¶ 傳回 CPU 裝置的數量(不是核心數)。永遠是 1。 注意:此函數的存在只是為了方便與裝置無關的程式碼 傳回類型 int