From b0f39ad337b487e3a527f58c1a84ca0a786cb70a Mon Sep 17 00:00:00 2001 From: gongweibao Date: Sun, 13 Oct 2019 08:47:37 +0800 Subject: [PATCH] cherry pick test=develop test=release/1.6 (#20391) --- 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 4ca4a8972c7..1446a4a212b 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