Skip to content

Commit 41d8bcd

Browse files
committed
Fix models #725
1 parent 5a159f3 commit 41d8bcd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/paddle/fluid/optimizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ def minimize(self,
223223
params_grads = append_backward(loss, parameter_list, no_grad_set,
224224
[error_clip_callback])
225225

226+
params_grads = sorted(params_grads, key=lambda x: x[0].name)
227+
226228
params_grads = append_gradient_clip_ops(params_grads)
227229

228230
# Add regularization if any

0 commit comments

Comments
 (0)