评价此页

device#

class torch.mtia.device(device)[来源]#

更改选定设备的上下文管理器。

参数

device (torch.deviceint) – 要选择的设备索引。如果此参数为负整数或 None,则此操作无效。