From 55ff03b7ab858051abafbcadd41fcbc851e67243 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 6 Aug 2018 05:41:49 +0000 Subject: [PATCH] Do not set loss@Grad as persistable Revert part of a3ca4c99ebb6c6bbe34606eb19cf6574fe9b3525 --- python/paddle/fluid/backward.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/paddle/fluid/backward.py b/python/paddle/fluid/backward.py index 812f68bdd..3fb7019a4 100644 --- a/python/paddle/fluid/backward.py +++ b/python/paddle/fluid/backward.py @@ -572,8 +572,6 @@ def append_backward(loss, parameter_list=None, no_grad_set=None, program.current_block_idx = current_block_idx program._sync_with_cpp() - # FIXME(zcd): prevent loss.grad optimized by mem_opt. - loss.block.var(_append_grad_suffix_(loss.name)).persistable = True if parameter_list is not None: parameters = parameter_list -- GitLab