torch.get_device_module¶ torch.get_device_module(device=None)[source][source]¶ 返回与给定设备关联的模块(例如,torch.device(‘cuda’),“mtia:0”,“xpu”,...)。如果没有给出设备,则返回当前加速器或 CPU(如果不存在)的模块。