DN-DETR icon indicating copy to clipboard operation
DN-DETR copied to clipboard

error : python inference.py

Open STRUGGLE1999 opened this issue 1 year ago • 3 comments

I want to visualize the results, but when I run python inference.py,it broke an error:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper__index_select) image

STRUGGLE1999 avatar Mar 27 '23 06:03 STRUGGLE1999

It seems some tensors are put in CPU will some are in GPU. You can put all tensors on the GPU to fix this problem.

FengLi-ust avatar Mar 29 '23 03:03 FengLi-ust

Did you find the location of the problem, please?

akitten-cn avatar Jun 04 '23 10:06 akitten-cn