Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i have problem #12

Open
wangyuxuan-123 opened this issue Oct 9, 2020 · 2 comments
Open

i have problem #12

wangyuxuan-123 opened this issue Oct 9, 2020 · 2 comments

Comments

@wangyuxuan-123
Copy link

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
Copy link
Author

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

@EloyRoura
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants