未验证 提交 3c39475d 编写于 作者: W wanghuancoder 提交者: GitHub

fix old dygraph a vlog bug (#47115)

上级 1a14d011
......@@ -269,8 +269,8 @@ class TracedGradOp {
return;
} else {
for (auto& var : vars) {
VLOG(6) << "SetOutput var name: " << var->Name();
if (var && !var->OverridedStopGradient() && var->GradNode()) {
VLOG(6) << "SetOutput var name: " << var->Name();
if (map_dirty_grad_node_.find(var) != map_dirty_grad_node_.end()) {
// Because inplace var isn't a leaf var, it should have
// dirty_grad_node.
......@@ -283,8 +283,6 @@ class TracedGradOp {
// the var with `stop_gradient=True` to the var with
// `stop_gradient=False`.
node_->InsertGradPendingNode(var->GradNode());
VLOG(6) << (*node_.get())[0].Type() << " insertGradPendingNode "
<< (*(var->GradNode().get()))[0].Type();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册