Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question again on gradient_clipping_threshold #3696

Closed
yu239-zz opened this issue Aug 27, 2017 · 5 comments
Closed

question again on gradient_clipping_threshold #3696

yu239-zz opened this issue Aug 27, 2017 · 5 comments

Comments

@yu239-zz
Copy link

In an old Issue #775 , there seemed to be some discussions on how the gradient clipping is triggered. Currently, on a single machine Paddle always uses SgdLocalUpdater. However, gradient clipping is only used in SgdThreadUpdater. Is there any plan to fix this issue? Or can we always use SgdThreadUpdater?

@lcy-seso
Copy link
Contributor

I have the same problem. but it hasn't been solved yet ...

@lcy-seso
Copy link
Contributor

Previously, I just changed SgdLocalUpdater into SgdThreadUpdater and it worked, but I am not sure whether there may be certain problems.

@qingqing01
Copy link
Contributor

qingqing01 commented Aug 27, 2017

@yu239 The v2 API always use SgdThreadUpdater and the gradient_clipping works well now. If you use binary paddle_trainer to run job, the gradient_clipping doesn't work indeed.

@yu239-zz
Copy link
Author

@qingqing01 I use the class paddle::Trainer in the C++ code. It seems that SgdLocalUpdater is always used. So I can just change the Paddle source code (TrainerInternal.cpp) to use SgdThreadUpdater? Is there any potential issue by doing so?

@yu239-zz
Copy link
Author

@qingqing01 I can hack the source code so that SgdThreadUpdater is used in place of SgdLocalUpdater. But this does not seem like a final solution. If I use paddle::Trainer, is there any official way that I can specify SgdThreadUpdater without modifying the Paddle source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants