Hello,
I have following error while loading a 2 gpu trained model on cpu:
RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu
I tried loading with:
torch.load(‘my_model.pt’, ‘cpu’)
torch.load(‘my_model.pt’, map_location=lambda storage, location: ‘cpu’)
As I’ve researched. But always getting same error.
It seems the gpu-1 part is loaded in cpu, but gpu-0 part is not, so the error message.
I welcome some help.
Regards
Daniel