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 with CPU: AttributeError: module 'torch' has no attribute 'cpu' #389

Closed
ghost opened this issue Jun 29, 2020 · 2 comments · Fixed by #391
Closed

Training with CPU: AttributeError: module 'torch' has no attribute 'cpu' #389

ghost opened this issue Jun 29, 2020 · 2 comments · Fixed by #391

Comments

@ghost
Copy link

ghost commented Jun 29, 2020

torch.cpu.synchronize(device)

The torch.cpu is giving me "AttributeError: module 'torch' has no attribute 'cpu'"

Originally posted by @JokerYan in #366 (comment)

@ghost
Copy link
Author

ghost commented Jun 29, 2020

Thanks for reporting this @JokerYan . I did not test training with CPU before merging #366 .

Off-hand I think we just need to delete lines 13 and 14, the synchronize isn't needed for CPU.

@ghost
Copy link
Author

ghost commented Jun 29, 2020

I'm not sure training with CPU needs to be a supported mode, but maybe someone out there wants it?

@ghost ghost closed this as completed in #391 Jun 30, 2020
This issue was closed.
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

Successfully merging a pull request may close this issue.

0 participants