From ec00d28a2f4c9f2b961276ccbb3f143de2aeacf1 Mon Sep 17 00:00:00 2001 From: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> Date: Sat, 19 Mar 2022 05:03:16 +0100 Subject: [PATCH] Fix a typo in quantization tools (#10940) --- onnxruntime/python/tools/quantization/calibrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/tools/quantization/calibrate.py b/onnxruntime/python/tools/quantization/calibrate.py index c559112028..3165c5be8e 100644 --- a/onnxruntime/python/tools/quantization/calibrate.py +++ b/onnxruntime/python/tools/quantization/calibrate.py @@ -608,7 +608,7 @@ class HistogramCollector(CalibrationDataCollector): cdf = np.cumsum(hist/total) if self.symmetric: idx_right = np.searchsorted(cdf, percentile / 100.0) - thresholds_dict[tensor] = (-float(hist_edges[idx_ringht]), float(hist_edges[idx_right])) + thresholds_dict[tensor] = (-float(hist_edges[idx_right]), float(hist_edges[idx_right])) else: percent_to_cut_one_side = (100.0 - percentile) / 200.0 idx_right = np.searchsorted(cdf, 1.0 - percent_to_cut_one_side)