From 3c39475d9f11cf1d2e677406e92a7e9dd095b4a5 Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Wed, 19 Oct 2022 10:44:14 +0800 Subject: [PATCH] fix old dygraph a vlog bug (#47115) --- paddle/fluid/imperative/dygraph_grad_maker.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/imperative/dygraph_grad_maker.h b/paddle/fluid/imperative/dygraph_grad_maker.h index da2714ad0ac..aaa7f9fa412 100644 --- a/paddle/fluid/imperative/dygraph_grad_maker.h +++ b/paddle/fluid/imperative/dygraph_grad_maker.h @@ -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(); } } } -- GitLab