Skip to content

Commit

Permalink
debug print for feature quantization
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-xmos committed Aug 14, 2023
1 parent 5303e5d commit a8825d8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down

0 comments on commit a8825d8

Please sign in to comment.