diff --git a/paddle/fluid/operators/array_to_lod_tensor_op.cc b/paddle/fluid/operators/array_to_lod_tensor_op.cc index 9379ec2dd67f27299ead85c52a10cbdc4fc13932..f9222207d580b648b2cdb8482cfa762e2f29bea8 100644 --- a/paddle/fluid/operators/array_to_lod_tensor_op.cc +++ b/paddle/fluid/operators/array_to_lod_tensor_op.cc @@ -211,7 +211,7 @@ class ArrayToLoDTensorInferShape : public framework::InferShapeBase { PADDLE_ENFORCE_EQ( context->HasInput("X"), true, platform::errors::NotFound("Input(X) of BmmOp should not be null")); - PADDLE_ENFORCE_EQ(context->HasInput("RankTable", true), + PADDLE_ENFORCE_EQ(context->HasInput("RankTable"), true, platform::errors::NotFound( "Input(RankTable) of BmmOp should not be null")); // For compile-time, the first dim of input X and output Out should be -1. diff --git a/paddle/fluid/operators/lod_tensor_to_array_op.cc b/paddle/fluid/operators/lod_tensor_to_array_op.cc index df26680a9e21bc21b5ad2c55a26c2bb3788d7ac1..5df675803167bcc5ab48e6ec8ee444cd86bdba1d 100644 --- a/paddle/fluid/operators/lod_tensor_to_array_op.cc +++ b/paddle/fluid/operators/lod_tensor_to_array_op.cc @@ -108,11 +108,12 @@ class LoDTensorToArrayOp : public framework::OperatorBase { auto max_seq_len = items[0].length; auto rank_level = rank_table.level(); - PADDLE_ENFORCE_LT(rank_level, x.lod().size(), - platform::errors::InvalidArgument( - `"Input should be a LoDTensor, and its lod_level should be at " - "least %d", - rank_level + 1)); + PADDLE_ENFORCE_LT( + rank_level, x.lod().size(), + platform::errors::InvalidArgument( + "Input should be a LoDTensor, and its lod_level should be at " + "least %d", + rank_level + 1)); out.resize(max_seq_len); std::vector> copy_ranges(max_seq_len);