From 74ead6ff35c7002ab735eaa52a25c20080e2aca3 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 21 Dec 2018 15:24:14 +0800 Subject: [PATCH] Polish code --- paddle/fluid/imperative/layer.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/paddle/fluid/imperative/layer.cc b/paddle/fluid/imperative/layer.cc index ef6d8f401..fcddcc4ed 100644 --- a/paddle/fluid/imperative/layer.cc +++ b/paddle/fluid/imperative/layer.cc @@ -153,9 +153,6 @@ void VarBase::ApplyGrad(framework::Scope* scope, Variable* grad) { std::vector OpBase::ApplyGrad(framework::Scope* scope) { VLOG(3) << "op grad " << grad_op_desc_->Type(); - if (!grad_to_var_) { - return {}; - } for (const std::string& grad_invar : grad_op_desc_->InputArgumentNames()) { if (grad_to_var_->find(grad_invar) == grad_to_var_->end()) { -- GitLab