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)
标签:code oca matching key str gpu number keyword use
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
标签:code oca matching key str gpu number keyword use
原文地址:https://www.cnblogs.com/beatets/p/8531914.html