评价此页

torch.cpu.set_device#

torch.cpu.set_device(device)[源代码]#

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

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