From ce6777fcdfe2fbbde52a1adff27d36e2de0dcf50 Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Mon, 18 Jan 2021 21:08:02 +0800 Subject: [PATCH] Fix bug of supporting channelwise dygraph quantized model, test=develop (#30531) --- .../fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py b/python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py index a79b1ee18b..d93a2059bd 100644 --- a/python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py +++ b/python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py @@ -154,8 +154,7 @@ class Quant2Int8MkldnnPass(object): is_quantized_op = True for var_node in op_node.inputs: for front_op_node in var_node.inputs: - if "fake_quantize_dequantize_" not in front_op_node.name( - ): + if "quantize_dequantize" not in front_op_node.name(): is_quantized_op = False if not is_quantized_op: op_node.op()._set_attr("skip_quant", True) -- GitLab