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

Working GPU Example for demo_bnn_classification.ipynb #28

Open
janfelixklein opened this issue Nov 4, 2022 · 1 comment
Open

Working GPU Example for demo_bnn_classification.ipynb #28

janfelixklein opened this issue Nov 4, 2022 · 1 comment

Comments

@janfelixklein
Copy link

Hallo guys!

I just wanted to try out your example as mentioned in header. However I get the error

"Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!"

when running the fit method of the BnnClassification.
Have you tried this example on a GPU machine?
When I set device = torch.device("cpu"), it runs smoothly.

I have taken a closer look in your implementions and found several places, where tensors are created without having the device in mind.

Best regards

JFK

@pronics2004
Copy link
Member

Thanks @janfelixklein. We will follow up on this issue. Meanwhile, if you have a working fix, please feel free to submit a PR.

FYI: @SoumyaTGhosh

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