From 2850c47385611b6b9fee3ba063a7eb6d733df555 Mon Sep 17 00:00:00 2001 From: chengduozh Date: Mon, 4 Mar 2019 22:55:15 +0800 Subject: [PATCH] remove unnecessary code test=release/1.3 --- paddle/fluid/operators/recurrent_op.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/paddle/fluid/operators/recurrent_op.cc b/paddle/fluid/operators/recurrent_op.cc index fbacd0aa6..88c968a0e 100644 --- a/paddle/fluid/operators/recurrent_op.cc +++ b/paddle/fluid/operators/recurrent_op.cc @@ -623,11 +623,8 @@ class RecurrentGradOpShapeInference : public framework::InferShapeBase { std::vector input{kInputs, kInitialStates}; std::vector output{kOutputs}; for (auto &s : input) { - PADDLE_ENFORCE(ctx->HasInputs(s)); // NOTE(zcd): In some case, some of kInputs doesn't have gradient. - // PADDLE_ENFORCE(ctx->HasOutputs(framework::GradVarName(s)), - // "Cannot find the gradient variable %s", - // framework::GradVarName(s)); + PADDLE_ENFORCE(ctx->HasInputs(s)); } for (auto &s : output) { PADDLE_ENFORCE(ctx->HasInputs(s)); -- GitLab