Answers for "please use torch.load with map_location='cpu' to map your storages to the CPU."

1

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available()

model = torch.load('mymodel.pt',map_location=torch.device('cpu'))
Posted by: Guest on January-13-2021

Code answers related to "please use torch.load with map_location='cpu' to map your storages to the CPU."

Python Answers by Framework

Browse Popular Code Answers by Language