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

Training on GPU #2

Open
gombru opened this issue Feb 16, 2018 · 0 comments
Open

Training on GPU #2

gombru opened this issue Feb 16, 2018 · 0 comments

Comments

@gombru
Copy link

gombru commented Feb 16, 2018

I saw that the code has this commented line:
# torch.cuda.set_device(args.gpu)
And by default it runs on CPU. If I uncomment the line and set
torch.cuda.set_device(0)
it still runs on CPU. And if I call
model.cuda()
after initializing the model it crashes saying it doesn't get the expected tensor types.
Is the code prepared to run in GPU? How can I do it?

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

1 participant