This is caused by the unmatching of gpu device number when loading a saved model.

 

torch.load('my_file.pt', map_location=lambda storage, loc: storage)

 

 

ref:

http://blog.csdn.net/shincling/article/details/78919282

相关文章: