From a8825d8ed6870390c81687a5557a810ac8604441 Mon Sep 17 00:00:00 2001 From: Allan Skellett Date: Mon, 14 Aug 2023 10:16:55 -0400 Subject: [PATCH] debug print for feature quantization --- .../inference/test_vnr_priv_feature_quantise.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lib_vnr/vnr_unit_tests/inference/test_vnr_priv_feature_quantise.py b/test/lib_vnr/vnr_unit_tests/inference/test_vnr_priv_feature_quantise.py index d12de67d9..53f16e373 100644 --- a/test/lib_vnr/vnr_unit_tests/inference/test_vnr_priv_feature_quantise.py +++ b/test/lib_vnr/vnr_unit_tests/inference/test_vnr_priv_feature_quantise.py @@ -46,7 +46,9 @@ def test_vnr_priv_feature_quantise(target, tflite_model): ref = ref_output[fr*(fp.PATCH_WIDTH * fp.MEL_FILTERS) : (fr+1)*(fp.PATCH_WIDTH * fp.MEL_FILTERS)] dut = dut_output[fr*(fp.PATCH_WIDTH * fp.MEL_FILTERS) : (fr+1)*(fp.PATCH_WIDTH * fp.MEL_FILTERS)] diff = np.max(np.abs(ref-dut)) - assert(diff <= 1), f"ERROR: test_vnr_priv_feature_quantise frame {fr}. diff {diff} exceeds 0" + print(ref) + print(dut) + assert(diff < 0), f"ERROR: test_vnr_priv_feature_quantise frame {fr}. diff {diff} exceeds 0" print("max_diff = ",np.max(np.abs(ref_output-dut_output)))