kazuto1011 / smoothgrad-pytorch

PyTorch re-implementation of SmoothGrad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SmoothGrad with PyTorch

PyTorch implementation of SmoothGrad [1]. WIP, not tested on GPU.

Dependencies

  • Python 2.7
  • PyTorch
  • torchvision
  • tqdm

Examples

python main.py --image samples/cat_dog.png [--no-cuda] [--guided]

With the --guided option, you can generate smoothed maps from guided backproped gradients.

Model: ResNet-152 pre-trained on ImageNet
Prediction: bull mastiff - 54.3% @1
#samples: 100

Noise level (σ) 10% 15% 20%
SmoothGrad [1]
Guided Backprop + SmoothGrad

References

[1] D. Smikov, N. Thorat, B. Kim, F. Viégas, M. Wattenberg. "SmoothGrad: removing noise by adding noise". arXiv, 2017

About

PyTorch re-implementation of SmoothGrad

License:MIT License


Languages

Language:Python 98.2%Language:Shell 1.8%