agaldran / a_v_uncertain

Code for our ISBI 2019 paper on Artery/Vein classification with uncertainty predictions
20 stars 5 forks source link

Solving runtime error: Attempting to deserialize object on a CUDA device #8

Closed ashishsiddharth closed 2 years ago

ashishsiddharth commented 2 years ago

People 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."

need to add this line: checkpoint = torch.load(path_to_check_point, map_location=torch.device('cpu'))

in order to run this code.