sicara / tf-explain

Interpretability Methods for tf.keras models with Tensorflow 2.x
https://tf-explain.readthedocs.io
MIT License
1.02k stars 112 forks source link

Update integrated_gradients.py #185

Open hnurxn opened 2 years ago

hnurxn commented 2 years ago

completion of the missing formulas add x-x'

transform_to_normalized_grayscale(tf.abs(integrated_gradients)) -> transform_to_normalized_grayscale(tf.abs(integrated_gradients*images))

After testing, the modified code could interpret the image's attribution normally