This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Multi Precision Lamb Update operator #16885
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2d5587e
to
cdb1dc2
Compare
@mxnet-label-bot add [pr-awaiting-review] |
@eric-haibin-lin PR is ready for review |
cdb1dc2
to
a567228
Compare
access2rohit
commented
Dec 3, 2019
r2 = g.norm() | ||
# calculate lamb_trust_ratio | ||
r = 1. if r1 == 0. or r2 == 0. else r1 / r2 | ||
lr *= r | ||
# update weight | ||
weight[:] -= lr * g | ||
if use_multi_precision: |
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.
why adding this?
eric-haibin-lin
suggested changes
Dec 9, 2019
mx_w32 = _make_ndarrays(weights32_arr) | ||
mx_p_w32 = _make_ndarrays(weights32_arr) | ||
|
||
mx.nd.multi_mp_lamb_update( |
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.
The test case does not make sense. There's no such an op multi_mp_lamb_update
in this PR.
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.
forgot to remove old code :P
just removed
@mxnet-label-bot add [pr-awaiting-merge] |
eric-haibin-lin
approved these changes
Dec 10, 2019
ptrendx
pushed a commit
to ptrendx/mxnet
that referenced
this pull request
Dec 10, 2019
* multi-precision lamb update operator * removing multi-tensor code from lamb * doing operation beta^t outside of kernel call * removing unecessary functions from PyLAMB
eric-haibin-lin
pushed a commit
that referenced
this pull request
Dec 10, 2019
* multi-precision lamb update operator * removing multi-tensor code from lamb * doing operation beta^t outside of kernel call * removing unecessary functions from PyLAMB
eric-haibin-lin
pushed a commit
to eric-haibin-lin/mxnet
that referenced
this pull request
Dec 14, 2019
* multi-precision lamb update operator * removing multi-tensor code from lamb * doing operation beta^t outside of kernel call * removing unecessary functions from PyLAMB
eric-haibin-lin
added a commit
to eric-haibin-lin/mxnet
that referenced
this pull request
Dec 14, 2019
This reverts commit db4a0de.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
pr-awaiting-merge
Review and CI is complete. Ready to Merge
pr-awaiting-review
PR is waiting for code review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
adding to new operators:
Link to paper: https://arxiv.org/pdf/1904.00962.pdf
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Testing