PAIR-code / saliency

Framework-agnostic implementation for state-of-the-art saliency methods (XRAI, BlurIG, SmoothGrad, and more).
https://pair-code.github.io/saliency/
Apache License 2.0
950 stars 190 forks source link

integrated_gradients.py is not complete #2

Closed neouyghur closed 7 years ago

neouyghur commented 7 years ago

Hi, GetSmoothedMask function is not given at integrated_gradients.py.

experiencor commented 7 years ago

I think that GetSmoothedMask is defined in the superclass SaliencyMask. GetSmoothedMask is automatically obtained by applying GetMask on many noisy versions of the input image and taking the average in the end.

nsthorat commented 7 years ago

@experiencor is right, GetSmoothedMask simply calls GetMask by adding noise several times and averaging. This is agnostic of the specific technique, so can live on the base class.