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