Shortcuts

torch.cpu.current_device

torch.cpu.current_device()[源代码]

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

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

Return type

str