We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd5335c commit 2850c47Copy full SHA for 2850c47
paddle/fluid/operators/recurrent_op.cc
@@ -623,11 +623,8 @@ class RecurrentGradOpShapeInference : public framework::InferShapeBase {
623
std::vector<std::string> input{kInputs, kInitialStates};
624
std::vector<std::string> output{kOutputs};
625
for (auto &s : input) {
626
- PADDLE_ENFORCE(ctx->HasInputs(s));
627
// 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));
+ PADDLE_ENFORCE(ctx->HasInputs(s));
631
}
632
for (auto &s : output) {
633
PADDLE_ENFORCE(ctx->HasInputs(s));
0 commit comments