Skip to content

Conversation

@abhinavarora
Copy link
Contributor

Fixes #4909

@abhinavarora abhinavarora self-assigned this Oct 19, 2017
beta2_pow_out = beta2_pow * beta2
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

2 participants