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 "plateau" LR policy #4606

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add "plateau" LR policy #4606

wants to merge 3 commits into from

Conversation

sanghoon
Copy link

@sanghoon sanghoon commented Aug 19, 2016

This PR adds a new LR policy called "plateau".
It's believed that as far as loss decreases it's better to keep the higher LR, and this policy help you to do that without repetitive trials or continuous monitoring.
With the policy, LR is lowered when the minimum loss isn't updated for a certain number of iterations (plateau_winsize). On the other hand, the LR never drops if loss keeps decreasing.

You should set one or more window-sizes (just like with "multistep" policy) in solver.prototxt

lr_policy: "plateau"
plateau_winsize: 10000
plateau_winsize: 20000
plateau_winsize: 40000
plateau_winsize: 80000

@sanghoon
Copy link
Author

This method has been used in experiments for the following article.
(The exact implementations are slightly different)
PVANET: Deep but Lightweight Neural Networks for Real-time Object Detection

@@ -181,6 +183,8 @@ message SolverParameter {
optional int32 stepsize = 13;
// the stepsize for learning rate policy "multistep"
repeated int32 stepvalue = 34;
// the stepsize for learning rate policy "plateau"
repeated int32 plateau_winsize = 41;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just re-use stepsize and/or stepvalue?

Also, did you mean to use plateau_winsize here? Your PR body mentions plateau_stepsize.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for your comment. I just updated the PR body.

Talking about plateau_winsize, I agree that it's not a bad idea to re-use stepvalue or stepsize. However, they specify exact number of iterations between LR drops while plateau_winsize is more like a minimum bound of of iterations between two consecutive LR drops. I thought sharing one parameter name might cause confusion.

@sanghoon
Copy link
Author

sanghoon commented Sep 1, 2016

Applied changes from the upstream

@JordanPeltier
Copy link

Hi,
"It's believed that as far as loss decreases it's better to keep the higher LR" -> Is this loss calculated on training or testing dataset ?
Thanks

@sanghoon
Copy link
Author

Hi @JM-MP
The current code supports monitoring 'training loss' only.

venkai added a commit to venkai/caffe that referenced this pull request May 5, 2017
Adds plateau LR policy to solver
venkai added a commit to venkai/caffe that referenced this pull request May 5, 2017
Adds plateau LR policy to solver
@twmht
Copy link
Contributor

twmht commented Nov 2, 2017

@sanghoon

Is this only supported in single gpu mode?

In multi-gpu mode, this->minimum_loss_ may be different in each of gpus.

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.

None yet

4 participants