This is a PyTorch implementation of attribution methods, Grad-Cam, Grad-Cam++, Guided Back Propagation, Guided Grad-Cam and Guided Grad-Cam++.
These codes have been used for the paper "Visual Explanation of a Deep Learning Solar Flare Forecast Model and Its Relationship to Physical Parameters" (https://doi.org/10.3847/1538-4357/abdebe).
These codes can be used for any custom models constructed by pytorch and pretrained models provided from torchvision.
Image | Container ship label | Steel arch bridge label |
Image | Bull mastiff label | Tigercat label |
Image | Sea lion label | Penguin label |
Example (4)- Grad-CAM results from the first CNN block to the last CNN block of the DenseNet161 model
Label | First block | Second block | Third block | Last block |
Indigo bird | ||||
Birdhouse |