未验证 提交 3da2c7f3 编写于 作者: C cc 提交者: GitHub

Update the error info for quantizaion (#32273)

上级 37bb3342
......@@ -225,9 +225,12 @@ void FuseDequant(ir::Graph* graph, Scope* scope,
quantized_op_type == "depthwise_conv2d") {
PADDLE_ENFORCE_EQ(
dequant_type, "fake_channel_wise_dequantize_max_abs",
platform::errors::InvalidArgument("conv2d op must be dequantized by "
"[fake_channel_wise_dequantize_max_"
"abs], but got %s",
platform::errors::InvalidArgument(
"conv2d op must be dequantized by "
"[fake_channel_wise_dequantize_max_abs], but got %s. "
"If you uses PaddleSlim to generate the quantized "
"model, please set the 'weight_quantize_type' params as "
"'channel_wise_abs_max' and generate the quantized model again.",
dequant_type));
PADDLE_ENFORCE_EQ(
weight_scale.size(), static_cast<size_t>(w_dims[0]),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册