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

cuda deserialization issue #43

Open
t-shubham opened this issue May 19, 2022 · 1 comment
Open

cuda deserialization issue #43

t-shubham opened this issue May 19, 2022 · 1 comment

Comments

@t-shubham
Copy link

Attempting to deserialize object on CUDA device 2 but torch.cuda.device_count() is 1. Please use torch.load with map_location to map your storages to an existing device.

what to do?

i am running pretrained model

@jacoblambert
Copy link

change line 98 of test.py to

model.load_state_dict(torch.load(configs.pretrained_path, map_location=torch.device('cuda:0')))

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