Skip to content

Commit 2850c47

Browse files
author
chengduozh
committed
remove unnecessary code
test=release/1.3
1 parent fd5335c commit 2850c47

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

paddle/fluid/operators/recurrent_op.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,8 @@ class RecurrentGradOpShapeInference : public framework::InferShapeBase {
623623
std::vector<std::string> input{kInputs, kInitialStates};
624624
std::vector<std::string> output{kOutputs};
625625
for (auto &s : input) {
626-
PADDLE_ENFORCE(ctx->HasInputs(s));
627626
// NOTE(zcd): In some case, some of kInputs doesn't have gradient.
628-
// PADDLE_ENFORCE(ctx->HasOutputs(framework::GradVarName(s)),
629-
// "Cannot find the gradient variable %s",
630-
// framework::GradVarName(s));
627+
PADDLE_ENFORCE(ctx->HasInputs(s));
631628
}
632629
for (auto &s : output) {
633630
PADDLE_ENFORCE(ctx->HasInputs(s));

0 commit comments

Comments
 (0)