torch.cpu.current_device¶ torch.cpu.current_device()[源代码][源代码]¶ 返回 CPU 的当前设备。始终为 ‘cpu’。 注意:此函数仅用于促进设备无关代码的编写 返回类型 str