From edfec1d36fa127500a3b5a9f596afee4d6dea6a5 Mon Sep 17 00:00:00 2001 From: yongqiangma Date: Wed, 23 Sep 2020 14:02:26 +0000 Subject: [PATCH] add lod_rank_table. test=develop --- paddle/fluid/operators/lod_rank_table_op.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/operators/lod_rank_table_op.cc b/paddle/fluid/operators/lod_rank_table_op.cc index 7cbfbd03e1d..3d038722e12 100644 --- a/paddle/fluid/operators/lod_rank_table_op.cc +++ b/paddle/fluid/operators/lod_rank_table_op.cc @@ -58,7 +58,9 @@ output operators. class LoDRankTableInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext *context) const override { - PADDLE_ENFORCE(context->HasInput("X"), "LoDRankTable must have input X"); + PADDLE_ENFORCE_EQ( + context->HasInput("X"), true, + platform::errors::NotFound("LoDRankTable must have input X.")); } }; -- GitLab