torch.cpu.device_count¶ torch.cpu.device_count()[source][source]¶ 返回 CPU 设备数量(非核心数)。始终为 1。 注意。此函数仅存在以方便设备无关的代码 返回类型: int