d2-net
d2-net copied to clipboard
Extracting features encountered RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
Hello thank you for your work.
I would like to ask for assistance, I tried running the extract_features.py
I encountered this error:
File "../d2-net/extract_features.py", line 114, in
keypoints, scores, descriptors = process_multiscale( File "../Development/d2-net/lib/pyramid.py", line 86, in process_multiscale fmap_pos = fmap_pos[:, ids] RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
I use pytorch= 1.13.1 in my conda environment and have a GPU recognized as device.
Also, I already tried git pull to make sure the repo was up to date.
But I still encountered this error. Please help.
I fixed the issue but inserting ids = ids.cpu() before the line where the error occurs.