Skip to content

Pytorch implementations of Grad-Cam, Grad-Cam++, Guided backpropagation, Guided Grad-Cam, and Guided Grad-Cam++.

License

Notifications You must be signed in to change notification settings

KWYi/Attribution-methods-pytorch

Repository files navigation

Attribution methods - pytorch

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.

Example (1)- Grad-CAM results

Image Container ship label Steel arch bridge label

Example (2)- Guided backpropagation results

Image Bull mastiff label Tigercat label

Example (3)- Guided Grad-CAM results

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

About

Pytorch implementations of Grad-Cam, Grad-Cam++, Guided backpropagation, Guided Grad-Cam, and Guided Grad-Cam++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages