Skip to content

Commit

Permalink
Increase tolerance to atol=1e-5
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanradev93 committed Dec 2, 2024
1 parent c6fc402 commit 7f37aef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utils/ops.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import keras


def isclose(x1, x2, rtol=1e-5, atol=1e-8):
def isclose(x1, x2, rtol=1e-5, atol=1e-5):
return keras.ops.abs(x1 - x2) <= atol + rtol * keras.ops.abs(x2)


def allclose(x1, x2, rtol=1e-5, atol=1e-8):
def allclose(x1, x2, rtol=1e-5, atol=1e-5):
return keras.ops.all(isclose(x1, x2, rtol, atol))


Expand Down

2 comments on commit 7f37aef

@LarsKue
Copy link
Contributor

@LarsKue LarsKue commented on 7f37aef Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaults matched numpy's values, why change them there?

@stefanradev93
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an attempt to fix the test instability, which I now pinpointed to the poorly designed two moons fit testing procedure and will fix accordingly.

Please sign in to comment.