a-PyTorch-Tutorial-to-Object-Detection
a-PyTorch-Tutorial-to-Object-Detection copied to clipboard
RuntimeError: expected device cpu but got device cuda:0 when I run train.py
Hi everyone !!!
I'm trying to run this code to train on my own dataset but I'm having this issue.
Here is my problem :
Traceback (most recent call last):
File "train.py", line 232, in
So I supposed one of the two elements (cxcy or priors_cxcy) is not passed in cuda. I looked in the code for those elements but it seems that every elements are using .cuda().
If someone already has had this problem please help me. Any thoughts are welcome !
It seems you're running this on a machine without a graphics card.. Or perhaps the graphics cards or the drivers are not properly configured & bind with PyTorch!
have you downloaded the Cuda tool kit and bind it correctly with PyTorch?