ascust / 3DMM-Fitting-Pytorch

A 3DMM fitting framework using Pytorch.
600 stars 95 forks source link

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

Open user52Real opened 12 months ago

user52Real commented 12 months ago

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 commented 10 months ago

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.