提交 2850c473 编写于 作者: C chengduozh

remove unnecessary code

test=release/1.3
上级 fd5335c8
...@@ -623,11 +623,8 @@ class RecurrentGradOpShapeInference : public framework::InferShapeBase { ...@@ -623,11 +623,8 @@ class RecurrentGradOpShapeInference : public framework::InferShapeBase {
std::vector<std::string> input{kInputs, kInitialStates}; std::vector<std::string> input{kInputs, kInitialStates};
std::vector<std::string> output{kOutputs}; std::vector<std::string> output{kOutputs};
for (auto &s : input) { for (auto &s : input) {
PADDLE_ENFORCE(ctx->HasInputs(s));
// NOTE(zcd): In some case, some of kInputs doesn't have gradient. // NOTE(zcd): In some case, some of kInputs doesn't have gradient.
// PADDLE_ENFORCE(ctx->HasOutputs(framework::GradVarName(s)), PADDLE_ENFORCE(ctx->HasInputs(s));
// "Cannot find the gradient variable %s",
// framework::GradVarName(s));
} }
for (auto &s : output) { for (auto &s : output) {
PADDLE_ENFORCE(ctx->HasInputs(s)); PADDLE_ENFORCE(ctx->HasInputs(s));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册