jindeok / XAI_torch_captum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XAI pytorch framework implementation with captum

XAI framework implementation with captum(https://captum.ai/): model interpretation with pytorch example codes with CIFAR-10 dataset, which can be replaced by other dataset

Dependancy

  • captum : conda install captum -c pytorch
  • torch / torchvision
  • numpy
  • matplotlib

Running

run main.py or in terminal,

python main.py --XAI_method 'IntegratedGradient'

XAI method can be replaced by other XAI methods listed as follows: GradientShap, DeepLift, DeepLiftShap, IntegratedGradients, LayerConductance, NeuronConductance, NoiseTunnel

which will produce explained heatmap and original image accordingly

image image

About


Languages

Language:Python 100.0%