Skip to content

Commit

Permalink
Fix models PaddlePaddle#725
Browse files Browse the repository at this point in the history
  • Loading branch information
reyoung committed Mar 14, 2018
1 parent 5a159f3 commit 41d8bcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/paddle/fluid/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def minimize(self,
params_grads = append_backward(loss, parameter_list, no_grad_set,
[error_clip_callback])

params_grads = sorted(params_grads, key=lambda x: x[0].name)

params_grads = append_gradient_clip_ops(params_grads)

# Add regularization if any
Expand Down

0 comments on commit 41d8bcd

Please sign in to comment.