-
Notifications
You must be signed in to change notification settings - Fork 201
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
"Expected all tensors to be on the same device" When Creating LIF Neurons #316
Comments
I got the same issue here! I think it is a library bug |
Apparently, this issue has come up before (#225) and a workaround was described there, but I was able to temporarily fix it by downgrading to version
|
I will take a look at this, in the meanwhile you can also fix this with.
|
I still find this error when running the training loop without population coding in Advanced Tutorials: Population Coding. Setting default device to cuda did not work, but downgrading to 0.8.1 did the job. I guess it's because of the deprecation of snntorch.backprop module. |
Have you tried installing snntorch from the source rather than pip? |
I am trying to do it in Colab now. However another error comes out, |
Ah I run into the same error, but it fixed when I restarted my run time... in any case, I'll update the pypi today or tomorrow. That'll hopefully fix everything. |
I am finally able to run both of the tutorial in Colab by installing and importing nir and nirtorch first before installing snntorch from the source. Nevertheless, updating the pypi will be a great help. Thank you! |
Description
I get an error telling me that all tensors must be on the same device when I try to create a new model on a GPU. Below is the code I am using. It seems to be a similar issue to the one here #225. If you manually set the device for each leaky object, like I did in the commented out lines, it fixes the issue.
What I Did
The text was updated successfully, but these errors were encountered: