评价此页

torch.cpu.device_count#

torch.cpu.device_count()[source]#

返回 CPU 设备(非核心)的数量。始终为 1。

注意:此函数仅用于方便设备无关的代码

返回类型

int