Discussed in #5528
Originally posted by rajanish4 November 15, 2022
Hi there,
I am currently running Grad cam class for my binary classification model that returns a single value. I believe, the grad cam compute function requires multiple class labels for it to work.
So, i would like to request a modification of this that can be used for such binary classification tasks.
Thanks
(the class score function and the subclasses are not compatible with such input models
|
def class_score(self, logits, class_idx): |
|
return logits[:, class_idx].squeeze() |
)
Discussed in #5528
Originally posted by rajanish4 November 15, 2022
Hi there,
I am currently running Grad cam class for my binary classification model that returns a single value. I believe, the grad cam compute function requires multiple class labels for it to work.
So, i would like to request a modification of this that can be used for such binary classification tasks.
Thanks
(the class score function and the subclasses are not compatible with such input models
MONAI/monai/visualize/class_activation_maps.py
Lines 125 to 126 in 5e6f105