Skip to content

Gradcam for models that return a single value #5530

@wyli

Description

@wyli

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()
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions