keisen / tf-keras-vis

Neural network visualization toolkit for tf.keras
https://keisen.github.io/tf-keras-vis-docs/
MIT License
311 stars 45 forks source link

Is Vanilla Saliency Implemented? I could see only smooth-grad in saliency.py #55

Closed man0007 closed 3 years ago

bersbersbers commented 3 years ago

Yes. https://www.github.com/keisen/tf-keras-vis/tree/master/README.md

bersbersbers commented 3 years ago

Your comment implies that you are not aware of the relationship between Vanilla saliency and SmoothGrad, so you probably haven't read the relevant literature. You should - blindly applying any CNN visualization method is not what interpretable machine learning is about. Links are in the readme as well.

keisen commented 3 years ago

@man0007 , In default (that's when smooth_samples=0) ,the Saliency#__call__() works as Vanilla Saliency. When setting 1 or more to smooth_sample, it will work as Smooth Grad.

https://github.com/keisen/tf-keras-vis/blob/ddd951396f16e7f5b7a0e8619f43f99c599628fb/tf_keras_vis/saliency.py#L9-L13

Please see this example notebook for details!

I would be glad if it helped you out. Although I'm going to close this issue, please feel free to re-open this issue when you have any question or face any problem. Thanks!