未验证 提交 57352bc7 编写于 作者: X XGZhang 提交者: GitHub

fix a quantization bug (#33753)

上级 af9dcb2d
......@@ -1148,7 +1148,7 @@ class QuantizationFreezePass(object):
], "the dim of scale_v should be 1 or 2"
if scale_v.ndim == 2:
scale_v = scale_v[0]
if scale_v.size == 1:
if scale_v.size == 1 and self._weight_quantize_type == 'abs_max':
scale_v = scale_v[0]
else:
scale_v = scale_v.tolist()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册