BDRAR icon indicating copy to clipboard operation
BDRAR copied to clipboard

i have problem

Open wangyuxuan-123 opened this issue 4 years ago • 2 comments

when i run this code,it show Attempting to deserialize object on CUDA device 1 but torch.cuda.device_count() is 1. Please use torch.load with map_location to map your storages to an existing device.Do you know how to solve this ?

wangyuxuan-123 avatar Oct 09 '20 08:10 wangyuxuan-123

i write map_location='cuda:0',it doesn't work.

wangyuxuan-123 avatar Oct 09 '20 08:10 wangyuxuan-123

I had a similar issue, first I modified the serilization.py class to hardcoding the cuda device I wanted to use. Now, the workarround I found was to add map_location={'cuda:1': 'cuda:0'} when loading

EloyRoura avatar Feb 10 '21 13:02 EloyRoura