From a0ee09148edcf223f697c47de0fba5191dbff00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Mon, 11 Jan 2021 19:17:13 +0800 Subject: [PATCH] enhance error msgs of fusion_seqpool_cvm_concat_op.cc, test=develop (#30240) --- .../fused/fusion_seqpool_cvm_concat_op.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/fused/fusion_seqpool_cvm_concat_op.cc b/paddle/fluid/operators/fused/fusion_seqpool_cvm_concat_op.cc index ecb7db46a9d..123c4c885ea 100644 --- a/paddle/fluid/operators/fused/fusion_seqpool_cvm_concat_op.cc +++ b/paddle/fluid/operators/fused/fusion_seqpool_cvm_concat_op.cc @@ -31,15 +31,15 @@ void FusionSeqPoolCVMConcatOp::InferShape( paddle::platform::errors::InvalidArgument( "Output(Out) of FusionSeqPoolCVMConcatOp should not be null.")); int axis = ctx->Attrs().Get("axis"); - PADDLE_ENFORCE_EQ( - axis, 1, - paddle::platform::errors::InvalidArgument( - "FusionSeqPoolCVMConcatOp only supports concat axis=1 yet.")); + PADDLE_ENFORCE_EQ(axis, 1, paddle::platform::errors::InvalidArgument( + "FusionSeqPoolCVMConcatOp only supports " + "concat axis=1 yet, but received %d.", + axis)); bool use_cvm = ctx->Attrs().Get("use_cvm"); - PADDLE_ENFORCE_EQ( - use_cvm, true, - paddle::platform::errors::InvalidArgument( - "FusionSeqPoolCVMConcatOp only supports use_cvm is true yet.")); + PADDLE_ENFORCE_EQ(use_cvm, true, paddle::platform::errors::InvalidArgument( + "FusionSeqPoolCVMConcatOp only supports " + "use_cvm is true yet, but received %d.", + use_cvm)); auto ins_dims = ctx->GetInputsDim("X"); const size_t n = ins_dims.size(); -- GitLab