RuntimeError: cuda runtime error (10) : invalid device ordinal

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

posted @ 2018-03-09 08:06  蠢材少年  阅读(3666)  评论(0编辑  收藏  举报