Skip to content

Commit f4fccf3

Browse files
committed
edit the sqnr threshold
1 parent 1bfa370 commit f4fccf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/quantization/test_mixed_precision.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def test_weight_only_quant(quantization_bit=2, symmetric=False):
2222
y_wo = m(x)
2323
sqnr = compute_error(y_ref, y_wo)
2424
#SQNR_dB can be approximated by 6.02n, where n is the bit width of the quantization
25-
#e.g., we set sqnr threshold = 44 for 8-bit, so that 6.02 * 8= 48.16 fullfills
26-
assert sqnr > 44.0-(8-quantization_bit)*6.02, "sqnr: {} is too low".format(sqnr)
25+
#e.g., we set sqnr threshold = 42 for 8-bit, so that 6.02 * 8= 48.16 fullfills
26+
assert sqnr > 42.0-(8-quantization_bit)*6.02, "sqnr: {} is too low".format(sqnr)
2727

2828

2929
# test if the asymmetric and symmetric quantization API works with different bit widths

0 commit comments

Comments
 (0)