评价此页

torch.cpu.set_device#

torch.cpu.set_device(device)[source]#

设置当前设备,在CPU中我们不做任何操作。

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