Learning rate scheduler
See original GitHub issueHi, I noticed that with default configuration like:
optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=1.0 / 3,
step=[16, 21])
the learning rate will decrease to 1/10 when training reaches a plateau (several epochs/iters?). Now I want to change those settings, like in pytorch we have ‘patience’ or so. What is the api name for that ? Are there any documentation I can refer to? Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Learning Rate Schedules and Adaptive Learning Rate ...
Learning rate schedules seek to adjust the learning rate during training by reducing the learning rate according to a pre-defined schedule. Common learning...
Read more >LearningRateScheduler - Keras
schedule: a function that takes an epoch index (integer, indexed from 0) and current learning rate (float) as inputs and returns a new...
Read more >12.11. Learning Rate Scheduling - Dive into Deep Learning
More generally we want to define a scheduler. When invoked with the number of updates it returns the appropriate value of the learning...
Read more >Using Learning Rate Schedules for Deep Learning Models in ...
Adapting the learning rate for your stochastic gradient descent optimization procedure can increase performance and reduce training time.
Read more >LearningRateScheduler | Tensorflow ... - Analytics Vidhya
LearningRateScheduler is one of the callbacks in Keras API (Tensorflow). Callbacks are those utilities that are called during the training ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In
mmcv/runner/runner.py
I sawhook_name = lr_config['policy'].title() + 'LrUpdaterHook'
and inmmcv/mmcv/runner/hooks/lr_updater.py
I saw things likeclass FixedLrUpdaterHook(LrUpdaterHook):
andclass StepLrUpdaterHook(LrUpdaterHook)
Thus, learning rate planner in configuration file of mmd should be like lr_config = dict(policy=‘step’, #Here, could alter to fixed, step, exp, poly, inv, cosine warmup=‘linear’,
warmup_iters=500,
warmup_ratio=1.0 / 3, step=[16, 21])
@rubeea Thanks. After reflection
poly
schedule seems to be able to help to find the optimal lr. You can fix indirectly start_lr and end_lr by fix min_lr inlr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
, and your initial lr in your optimizer.