未验证 提交 c0c18cf9 编写于 作者: G Guanghua Yu 提交者: GitHub

fix unsqueeze2+conv2d quantization (#49164)

上级 c123dd1e
......@@ -659,8 +659,12 @@ class PostTrainingQuantization:
_logger.warning(
op_type + " is not supported for quantization."
)
is_conv1d_quant = (op_type == "unsqueeze2") and (
utils._get_op_input_var_names(op)[0]
in persistable_var_names
)
# For quantized ops, sample inputs and outputs
if op_type in self._quantizable_op_type:
if op_type in self._quantizable_op_type or is_conv1d_quant:
collect_var_name(
utils._get_op_input_var_names(op),
persistable_var_names,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册