Skip to content

Conversation

nalinimsingh
Copy link

From my read of the GradCAM paper, this matrix should be initialized with zeroes, so that cam contains only the weighted sum of the entries in outputs. Feel free to correct me here if I'm misinterpreting anything!

[This doesn't affect the qualitative trend you see across the image in any of the generated GradCAM masks, since this is a constant shift at each pixel, but it does slightly perturb some of the numeric values.]

From my read of the GradCAM paper, this matrix should be initialized with zeroes, so that cam contains only the weighted sum of the entries in outputs. Feel free to correct me here if I'm misinterpreting anything!

[This doesn't affect the qualitative trend you see across the image in any of the generated GradCAM masks, since this is a constant shift at each pixel, but it does slightly perturb some of the numeric values.]
@potocpav
Copy link

For VGG it doesn't matter, but for my network, this change was necessary to get meaningful results. It is indeed the correct approach.

@nalinimsingh
Copy link
Author

@jacobgil Friendly ping -- are you able to review this?

@habibrostami
Copy link

I have a model with excellent accuracy an Roc but heat map generated by using grad cam is not reasonable? I used a architecture contains dome conv and batch normalizatio.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants