A basic implementation of Layer-wise Relevance Propagation (LRP) in PyTorch
Basic unsupervised implementation of Layer-wise Relevance Propagation (Bach et al.,
Montavon et al.) in PyTorch for VGG networks from PyTorch’s Model Zoo.
This tutorial served as a starting point.
In this implementation, I tried to make sure that the code is easy to understand and easy to extend to other
network architectures.
I also added a novel relevance propagation filter to this implementation resulting in much crisper heatmaps
(see my blog for more information).
If you want to use it, please don’t forget to cite this implementation.
This implementation is already reasonably fast.
It is therefore also suitable for projects that want to use LRP in real time.
Using a RTX 2080 Ti graphics card I reach 53 FPS with the VGG-16 network.
If I