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

Removing updates of Beta1 and Beta2 power accumulators outside the op #4925

Merged
merged 1 commit into from
Oct 19, 2017

Conversation

abhinavarora
Copy link
Contributor

Fixes #4909

@abhinavarora abhinavarora self-assigned this Oct 19, 2017
learning_rate_t = learning_rate_t *
sqrt(1 - beta2_pow_out) / (1 - beta1_pow_out)
sqrt(1 - beta2_pow) / (1 - beta1_pow)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we no longer need to update beta_pow to beta_pow * beta inside the operatorKernel. I am wondering when and where will beta_pow be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need these because beta1 and beta2 power accumulators will be constant for all parameters. On the other hand, we will have one instance of the adam_op for every parameter. So these will be done in accumulators that the Python API will control.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

Copy link

@tonyyang-svail tonyyang-svail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@abhinavarora abhinavarora merged commit 11bebeb into PaddlePaddle:develop Oct 19, 2017
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

Successfully merging this pull request may close these issues.

2 participants