评价此页

torch.cpu.current_device#

torch.cpu.current_device()[source]#

返回当前 CPU 设备。始终为 ‘cpu’。

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

返回类型

str