device_count

RuntimeError: Attempting to deserialize object on CUDA device 1 but torch.cuda.device_count() is 1.

问题:服务器上多块卡,使用其中一张训练的模型,在本地预测的时候报错。 解决:在torch.load中加入map_location,指定一块卡 ......
共1篇  :1/1页 首页上一页1下一页尾页