Skip to content

Commit 82e6032

Browse files
skywallStrycekSimon
authored andcommitted
NXP backend: Print information about max error during the output tensor comparison
1 parent b340ad1 commit 82e6032

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backends/nxp/tests/executors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ def compare_output_arrays(
196196

197197
assert tfl_output.shape == edge_output.shape, "Output shapes don't match!"
198198

199+
if (max_diff := np.abs(np.max(tfl_output - edge_output))) > 0.0:
200+
logger.w(
201+
f"Maximum absolute difference of the tensor '{output_name}': '{max_diff}'"
202+
)
203+
199204
assert np.allclose(
200205
tfl_output, edge_output, rtol=rtol, atol=atol, equal_nan=True
201206
), f"Output values of the `{output_name}` tensor don't match!"

0 commit comments

Comments
 (0)