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

Can this be only run on CUDA enabled pytorch? #2

Open
nla-asia opened this issue Jan 28, 2020 · 2 comments
Open

Can this be only run on CUDA enabled pytorch? #2

nla-asia opened this issue Jan 28, 2020 · 2 comments

Comments

@nla-asia
Copy link

I am getting assertion error "Torch version is not compiled for CUDA support" when try to run on macosx Mojave.

@aladagemre
Copy link

@naysumyat

A workaround:

  • Open up test.py
  • Comment out net.cuda() and img = img.cuda() lines
  • Add map_location argument to torch.load: net.load_state_dict(torch.load(cp, map_location=torch.device('cpu')))

@opusviz
Copy link

opusviz commented Dec 21, 2022

@naysumyat

A workaround:

  • Open up test.py
  • Comment out net.cuda() and img = img.cuda() lines
  • Add map_location argument to torch.load: net.load_state_dict(torch.load(cp, map_location=torch.device('cpu')))

Thank you. it worked.

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

3 participants