提交 104d3b4e 编写于 作者: D dzhwinter

add details. test=develop

上级 3932cd67
...@@ -272,9 +272,12 @@ class ElementwiseGradOpInplace : public framework::InplaceInToOut { ...@@ -272,9 +272,12 @@ class ElementwiseGradOpInplace : public framework::InplaceInToOut {
std::unordered_map<std::string, std::string> Apply( std::unordered_map<std::string, std::string> Apply(
const framework::OpDesc &op_desc, const framework::OpDesc &op_desc,
framework::BlockDesc *block) const override { framework::BlockDesc *block) const override {
return std::unordered_map<std::string, std::string>{ std::unordered_map<std::string, std::string> ret;
{framework::GradVarName("Out"), framework::GradVarName("X")}, if (block->HasVar(framework::GradVarName("X")) &&
}; block->HasVar(framework::GradVarName("Out"))) {
ret[framework::GradVarName("Out")] = framework::GradVarName("X");
}
return ret;
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册