Skip to content

Commit 632ab3c

Browse files
committed
Update the error info for quantizaion
1 parent 22ea4c3 commit 632ab3c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

paddle/fluid/framework/ir/quant_conv2d_dequant_fuse_pass.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,13 @@ void FuseDequant(ir::Graph* graph, Scope* scope,
225225
quantized_op_type == "depthwise_conv2d") {
226226
PADDLE_ENFORCE_EQ(
227227
dequant_type, "fake_channel_wise_dequantize_max_abs",
228-
platform::errors::InvalidArgument("conv2d op must be dequantized by "
229-
"[fake_channel_wise_dequantize_max_"
230-
"abs], but got %s",
231-
dequant_type));
228+
platform::errors::InvalidArgument(
229+
"conv2d op must be dequantized by "
230+
"[fake_channel_wise_dequantize_max_abs], but got %s. "
231+
"If you uses PaddleSlim to generate the quantized "
232+
"model, please set the 'weight_quantize_type' params as "
233+
"'channel_wise_abs_max' and generate the quantized model again.",
234+
dequant_type));
232235
PADDLE_ENFORCE_EQ(
233236
weight_scale.size(), static_cast<size_t>(w_dims[0]),
234237
platform::errors::InvalidArgument(

0 commit comments

Comments
 (0)