From 1e6617156b064c3b12ed6e02c93d0af2843e253f Mon Sep 17 00:00:00 2001 From: smallv0221 <33639025+smallv0221@users.noreply.github.com> Date: Sun, 27 Sep 2020 10:52:42 +0800 Subject: [PATCH] Update lstm_unit_op.cc --- paddle/fluid/operators/lstm_unit_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/lstm_unit_op.cc b/paddle/fluid/operators/lstm_unit_op.cc index e6ffda201b..e4b72cb50b 100644 --- a/paddle/fluid/operators/lstm_unit_op.cc +++ b/paddle/fluid/operators/lstm_unit_op.cc @@ -25,8 +25,8 @@ class LstmUnitOp : public framework::OperatorWithKernel { void InferShape(framework::InferShapeContext* ctx) const override { OP_INOUT_CHECK(ctx->HasInput("X"), "Input", "X", "lstm_unit"); OP_INOUT_CHECK(ctx->HasInput("C_prev"), "Input", "C_prev", "lstm_unit"); - OP_INOUT_CHECK(ctx->HasInput("C"), "Output", "C", "lstm_unit"); - OP_INOUT_CHECK(ctx->HasInput("H"), "Output", "H", "lstm_unit"); + OP_INOUT_CHECK(ctx->HasOutput("C"), "Output", "C", "lstm_unit"); + OP_INOUT_CHECK(ctx->HasOutput("H"), "Output", "H", "lstm_unit"); auto x_dims = ctx->GetInputDim("X"); auto c_prev_dims = ctx->GetInputDim("C_prev"); -- GitLab