Shortcuts

torch.cpu.set_device

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

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

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