Skip to content

Commit

Permalink
Update math_test.py
Browse files Browse the repository at this point in the history
lowered the precision tolerance to 1e-4 for erf function
  • Loading branch information
sqali authored Sep 22, 2023
1 parent ebe06c3 commit 3f199c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keras_core/ops/math_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def test_erf_operation_basic(self):
output_from_erf_op = kmath.erf(sample_values)

# Assert that the outputs are close
self.assertAllClose(expected_output, output_from_erf_op, atol=1e-5)
self.assertAllClose(expected_output, output_from_erf_op, atol=1e-4)

def test_erf_operation_dtype(self):
# Test for float32 and float64 data types
Expand All @@ -861,7 +861,7 @@ def test_erf_operation_dtype(self):
sample_values
)
output_from_erf_op = kmath.erf(sample_values)
self.assertAllClose(expected_output, output_from_erf_op, atol=1e-5)
self.assertAllClose(expected_output, output_from_erf_op, atol=1e-4)

def test_erf_operation_edge_cases(self):
# Test for edge cases
Expand All @@ -871,5 +871,5 @@ def test_erf_operation_edge_cases(self):
)
output_from_edge_erf_op = kmath.erf(edge_values)
self.assertAllClose(
expected_edge_output, output_from_edge_erf_op, atol=1e-5
expected_edge_output, output_from_edge_erf_op, atol=1e-4
)

0 comments on commit 3f199c3

Please sign in to comment.