Closed Pei4579 closed 8 months ago
To fix this problem, just add .cuda() at the end of every label in methods.py as follows:
Then you might get another issue about clone(), just add .clone() in methods_helper.py behind the indices as follows:
Another tips while using this package: The path of the image refers to a folder with plenty of images, not a single image path. It means it's the path of a folder rather than an image, like home/user/images but not home/user/images/test_picture.png.
No matter which sample code I run, it turns out RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (CPU), however, when I look into the code I found that the indices are only used when opt==LS. Is there anything I missed? Thanks in advanced!