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