Skip to content

Commit 3300a53

Browse files
authored
Merge pull request #12546 from reyoung/feature/fix_nmt_cannot_save_checkpoint
Do not set loss@Grad as persistable
2 parents 23252a3 + 55ff03b commit 3300a53

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

python/paddle/fluid/backward.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ def append_backward(loss, parameter_list=None, no_grad_set=None,
572572

573573
program.current_block_idx = current_block_idx
574574
program._sync_with_cpp()
575-
# FIXME(zcd): prevent loss.grad optimized by mem_opt.
576-
loss.block.var(_append_grad_suffix_(loss.name)).persistable = True
577575

578576
if parameter_list is not None:
579577
parameters = parameter_list

0 commit comments

Comments
 (0)