From 7b9e33972a9c94efec1213570da18b415f3a648b Mon Sep 17 00:00:00 2001 From: gongweibao Date: Thu, 10 Oct 2019 15:01:48 +0800 Subject: [PATCH] delete backward return list test=develop (#20294) --- python/paddle/fluid/contrib/mixed_precision/decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/contrib/mixed_precision/decorator.py b/python/paddle/fluid/contrib/mixed_precision/decorator.py index 4ca4a8972c..1446a4a212 100644 --- a/python/paddle/fluid/contrib/mixed_precision/decorator.py +++ b/python/paddle/fluid/contrib/mixed_precision/decorator.py @@ -135,7 +135,7 @@ class OptimizerWithMixedPrecison(object): scaled_g = g / self._loss_scaling scaled_params_grads.append([p, scaled_g]) - return scaled_params_grads, scaled_loss + return scaled_params_grads def apply_gradients(self, scaled_params_grads): """ @@ -194,7 +194,7 @@ class OptimizerWithMixedPrecison(object): The scaled loss by scaling factor, the list of optimize ops, and a list of scaled parameters and gradients. """ - scaled_params_grads, scaled_loss = self.backward( + scaled_params_grads = self.backward( loss, startup_program=startup_program, parameter_list=parameter_list, -- GitLab