You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need help, I am trying to reimplement the code on the cpu but I am getting this error: "RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU."
I tried to add map_loction =torch.device('cpu') after model.load_state_dict(torch.load(paft.format(LOAD_DIR)) as shown below but I am still getting the same error
model.load_state_dict(torch.load(paft.format(LOAD_DIR)),map_location=torch.device('cpu'))
The text was updated successfully, but these errors were encountered:
I need help, I am trying to reimplement the code on the cpu but I am getting this error: "RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU."
I tried to add map_loction =torch.device('cpu') after model.load_state_dict(torch.load(paft.format(LOAD_DIR)) as shown below but I am still getting the same error
model.load_state_dict(torch.load(paft.format(LOAD_DIR)),map_location=torch.device('cpu'))
The text was updated successfully, but these errors were encountered: