提交 ef55a8f6 编写于 作者: Y Yang Yu

Polish english

上级 38bb7d3e
...@@ -314,12 +314,12 @@ class ParallelDoGradOpDescMaker : public framework::SingleGradOpDescMaker { ...@@ -314,12 +314,12 @@ class ParallelDoGradOpDescMaker : public framework::SingleGradOpDescMaker {
std::vector<std::string> og_names; std::vector<std::string> og_names;
for (auto &og_name : this->OutputGrad(output_param)) { for (auto &og_name : this->OutputGrad(output_param)) {
if (all_inputs_in_grad_blocks.count(og_name) != 0) { if (all_inputs_in_grad_blocks.count(og_name) != 0) {
// there is some gradient operator needs the og, make this og as the // there are some gradient operators who need the OG. So make this
// input of parallel.do // OG as an input of parallel.do
// if there is no operator need this og, just do not make this og as
// input.
og_names.push_back(og_name); og_names.push_back(og_name);
} }
// else, there is no operator who need the OG. Do not use this OG as
// an input
} }
grad->SetInput(framework::GradVarName(output_param), og_names); grad->SetInput(framework::GradVarName(output_param), og_names);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册