-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Expose RMSProp optimizer. #9247
Conversation
python/paddle/fluid/optimizer.py
Outdated
class RMSPropOptimizer(Optimizer): | ||
""" | ||
Root Mean Squared Propagation (RMSProp) is an unpublished, adaptive learning | ||
rate method. The original slides that proposed Rmsprop: Slide 29 of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slides that proposed Rmsprop --> slides proposed Rmsprop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
python/paddle/fluid/optimizer.py
Outdated
.. math:: | ||
|
||
r(w, t) & = \\rho r(w, t-1) + (1 - \\rho)(\\nabla Q_{i}(w))^2 \\\\ | ||
v(w, t) & = \\beta v(w, t-1) + \\frac{\\eta} {\\sqrt{v(w,t) + \\epsilon}} \\nabla Q_{i}(w) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems exceeded 80 columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
python/paddle/fluid/optimizer.py
Outdated
learning_rate(float): global leraning rate. | ||
rho(float): rho is :math: `\\rho` in equation, set 0.95 by default. | ||
epsilon(float): :math: `\\epsilon` in equation is smoothing term to | ||
avoids division by zero, set 1e-6 by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoids --> avoid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
python/paddle/fluid/optimizer.py
Outdated
set 0.0 by default. | ||
|
||
|
||
Examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new section Raises
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
python/paddle/fluid/optimizer.py
Outdated
self._momentum = momentum | ||
|
||
def _create_accumulators(self, block, parameters): | ||
assert isinstance(block, framework.Block) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是也需要改成raise,以免assert在非debug模式下失效?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #9246