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

Add python wrapper for Adadelta optimizer #9213

Merged
merged 4 commits into from
Mar 20, 2018

Conversation

wanghaoshuang
Copy link
Contributor

fix #9212

@@ -580,6 +582,58 @@ def _append_optimize_op(self, block, param_and_grad):
return decayed_adagrad_op


class AdadeltaOptimizer(Optimizer):
"""Simple Adadelta optimizer with average squared grad state and
average squared update state.
Copy link
Contributor

Choose a reason for hiding this comment

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

def __init__(self, learning_rate, epsilon=1.0e-6, rho=0.95, **kwargs):
assert learning_rate is not None
assert epsilon is not None
assert rho is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to use raise not assert.

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

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

LGTM.

@wanghaoshuang wanghaoshuang merged commit 7e526a6 into PaddlePaddle:develop Mar 20, 2018
@wanghaoshuang wanghaoshuang deleted the adadelta branch March 20, 2018 06:49
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.

Add python wrapper for Adadelta optimizer
2 participants