Skip to content

Commit bd79f99

Browse files
committed
relax atol
1 parent 7b8991c commit bd79f99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/backend_test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _run_backend(self, g, outputs, input_dict):
9191
raise ValueError("unknown backend")
9292
return y
9393

94-
def run_test_case(self, feed_dict, input_names_with_port, output_names_with_port, rtol=1e-07, atol=0.,
94+
def run_test_case(self, feed_dict, input_names_with_port, output_names_with_port, rtol=1e-07, atol=1e-5,
9595
convert_var_to_const=True, constant_fold=True, check_value=True, check_shape=False,
9696
check_dtype=True, process_args=None, onnx_feed_dict=None, graph_validator=None):
9797
# optional - passed to process_tf_graph

tests/test_optimizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def run_and_compare(self, output_names_with_port, onnx_feed_dict, origin_proto,
4545
raise ValueError("only onnxruntime is supported to test transpose optimizer")
4646

4747
for expected_val, actual_val in zip(expected, actual):
48-
self.assertAllClose(expected_val, actual_val, rtol=rtol, atol=0.)
48+
self.assertAllClose(expected_val, actual_val, rtol=rtol, atol=1e-5)
4949
self.assertEqual(expected_val.dtype, actual_val.dtype)
5050
self.assertEqual(expected_val.shape, actual_val.shape)
5151

0 commit comments

Comments
 (0)