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

Posted 蠢材少年

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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)

 

以上是关于RuntimeError: cuda runtime error (10) : invalid device ordinal的主要内容,如果未能解决你的问题,请参考以下文章