Class correctness in gradcam.py
See original GitHub issueThere is a line in gradcam.py which says that if target_class = None
then the target_class
takes the argmax of the ouptut. Is it possible that the actual class might be different from the expected class?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Grad-CAM: Visualize class activation maps with Keras, ...
Learn how to visualize class activation maps for debugging deep neural networks using Grad-CAM. We'll then implement Grad-CAM using Keras ...
Read more >Understand your Algorithm with Grad-CAM | by Daniel Reiff
We'll show you how to improve accuracy and precision over the existing literature ... Gradient-weighted Class Activation Mapping (Grad-CAM), ...
Read more >Visualisation of CNN using Grad-Cam on PyTorch
class GradCam ():. """ Produces class activation map. """ def __init__(self, model, target_layer):. self.model = model. self.model.eval(). # Define extractor.
Read more >A Review of Different Interpretation Methods (Part 1: Saliency ...
In order to get the Grad-CAM of a given image and a class of interest, we can take a quite similar approach to...
Read more >Explaining Keras image classifier predictions with Grad-CAM
If we have a model that takes in an image as its input, and outputs class ... This has been tested with Python...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please read the code. If the target_class is not provided, it is taken from the prediction. When the target_class is provided, what comes out of the prediction is not used. So, there is no case when the user provides a class (e.g., 5) and the target_class magically changes to 44.
Thanks for the clarification.