-
Notifications
You must be signed in to change notification settings - Fork 450
[new] Add the YellowFin optimizer (YFOptimizer) #130
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
Open
Conversation
This file contains hidden or 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
Add the YellowFin optimizer,called YFOptimizer. YellowFin is an auto-tuning optimizer based on momentum SGD which requires no manual specification of learning rate and momentum. It measures the objective landscape on-the-fly and tunes momentum as well as learning rate using a local quadratic approximation. paper: https://arxiv.org/abs/1706.03471 code: https://github.com/JianGoForIt/YellowFin_Pytorch
codecov-io
commented
Jan 19, 2019
Codecov Report
@@ Coverage Diff @@ ## master #130 +/- ## ========================================== - Coverage 68% 65.99% -2.02% ========================================== Files 90 90 Lines 6286 6517 +231 ========================================== + Hits 4275 4301 +26 - Misses 2011 2216 +205
Continue to review full report at Codecov.
|
@ruizewang
ruizewang
changed the title
(削除) Update optimizer.py (削除ここまで)
(追記) [new] Add the YellowFin optimizer (YFOptimizer) (追記ここまで)
Jan 19, 2019
@FengZiYjun
FengZiYjun
requested review from
FengZiYjun,
choosewhatulike,
xuyige and
yhcc
January 25, 2019 08:46
FengZiYjun
FengZiYjun
approved these changes
Feb 10, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.
Description:
Add the YellowFin optimizer,called YFOptimizer.
YellowFin is an auto-tuning optimizer based on momentum SGD which requires no manual specification of learning rate and momentum. It measures the objective landscape on-the-fly and tunes momentum as well as learning rate using a local quadratic approximation.
We can use YFOptimizer just like Adam and SGD.
For example:
from fastNLP.core.optimizer import YFOptimizertrainer = Trainer(model=model, n_epochs=100, optimizer=YFOptimizer(lr=0.01), train_data=train_data, dev_data=dev_data, loss=CrossEntropyLoss(), metrics=AccuracyMetric() )paper: https://arxiv.org/abs/1706.03471
code: https://github.com/JianGoForIt/YellowFin_Pytorch
Main reason: Add a fancy optimizer, which performs well in many tasks, though has its shortcomings. The biggest advantage is that you can use the default parameters directly, no need to adjust LR manually. (Note: there are also some people say they get a bad performance.)
Checklist 检查下面各项是否完成
Please feel free to remove inapplicable items for your PR.
Changes: 逐项描述修改的内容
Mention: 找人review你的PR
@修改过这个文件的人
@核心开发人员