I encountered a issue with the generation of greyscale_cam (located in core.py). In short, some images will report exception "'int' object has no attribute 'backward'", while others won't. I found out that the problem is caused by the line that generates greyscale_cam.
The line originally looks like grayscale_cam = self.method(tensor, [self.target])
Even after changing the line to grayscale_cam = self.method(tensor.requires_grad_(), [self.target]) the problem still persists.
For records, I am using YOLOv8n.pt downloaded from Ultralytics and ISIC2019 dataset. The exception occurs when I try to use any method but "EigenCAM".
Hopefully a solution can be found as soon as possible.
Thanks for raising the issue.
We have been caught up in a few exams for the past week. We will try to replicate the issue and resolve it at the earliest.
Hello.
I encountered a issue with the generation of greyscale_cam (located in core.py). In short, some images will report exception "'int' object has no attribute 'backward'", while others won't. I found out that the problem is caused by the line that generates greyscale_cam.
The line originally looks like
grayscale_cam = self.method(tensor, [self.target])
Even after changing the line tograyscale_cam = self.method(tensor.requires_grad_(), [self.target])
the problem still persists.For records, I am using YOLOv8n.pt downloaded from Ultralytics and ISIC2019 dataset. The exception occurs when I try to use any method but "EigenCAM".
Hopefully a solution can be found as soon as possible.