-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: tensors used as indices must be long, byte or bool tensors #111
Comments
@samet-akcay |
Hi @alexriedel1 and @innat . Thanks for spotting this. @alexriedel1 if you prefer, feel free to create a PR for this to become a contributor! If not, we'll try to immediately add a fix |
Have you guys seen this issue when you train patchcore on GPU |
I did a PR . I haven't tried to reproduce the issue on GPU |
Describe the bug
When training PatchCore, I'm getting the following error:
IndexError: tensors used as indices must be long, byte or bool tensors
caused by the line
anomalib/anomalib/models/components/dimensionality_reduction/random_projection.py
Line 85 in c33d25a
To Reproduce
Steps to reproduce the behavior:
Run the PatchCore algorithm on CPU (maybe on GPU too)
The problem can be solved by casting to
c_idx
toc_idx.long()
The text was updated successfully, but these errors were encountered: