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

found at least two devices: cuda:0 and cpu #31

Open
user52Real opened this issue Nov 13, 2023 · 1 comment
Open

found at least two devices: cuda:0 and cpu #31

user52Real opened this issue Nov 13, 2023 · 1 comment

Comments

@user52Real
Copy link

Hello,

first of all thank you for the project.
I have an issue running your python script fit_single_img.py and Im getting this error :

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
Are there any commands to specify the device?

Thank you in advance.

@ascust
Copy link
Owner

ascust commented Jan 2, 2024

Could you be able to locate the error more accurately? Like which line caused the error. A general suggestion is that you print out the device of the variables before this specific operation and convert the device accordingly.

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