Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - L2 norm missing square root in AverageStability #127

Closed
carreremax opened this issue Apr 26, 2023 · 0 comments · Fixed by #141
Closed

[BUG] - L2 norm missing square root in AverageStability #127

carreremax opened this issue Apr 26, 2023 · 0 comments · Fixed by #141
Assignees

Comments

@carreremax
Copy link

carreremax commented Apr 26, 2023

Select the modules to which the bug refers:
Metrics

Describe the bug
L2 norm is missing square root in AverageStability.

l.56-57 of stability.py :
elif distance == 'l2':
self.distance = lambda x, y: tf.reduce_sum((x-y)**2.0)

Desktop (please complete the following information):
Windows

To Reproduce
You can check the difference between L1 et L2 explanation when the explanations values are high.
My explanations were for an image (512,512), with maximum of 2400 and average of 25.
On theses explanations :

  • Average stability with L1 norm outputs a value per pixel of around 16.7.
  • Average stability with L2 norm outputs a value per pixel of more than 1800.

Expected behavior
Sqrt added to the L2 norm.

@AntoninPoche AntoninPoche self-assigned this Sep 25, 2023
@AntoninPoche AntoninPoche linked a pull request Oct 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants