Skip to content

Commit 9d66415

Browse files
committed
fix g
1 parent 4447d2e commit 9d66415

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/paddle/fluid/clip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ def _static_clip(self, params_grads):
495495
'Y': scale_var},
496496
outputs={'Out': g})
497497

498-
param_new_grad_name_dict[p.name] = p.name
499-
params_and_grads.append((p, p))
498+
param_new_grad_name_dict[p.name] = g.name
499+
params_and_grads.append((p, g))
500500

501501
_correct_clip_op_role_var(params_and_grads, param_new_grad_name_dict)
502502
return params_and_grads

0 commit comments

Comments
 (0)