Skip to content

Commit

Permalink
MultiStepParamScheduler: allow num_updates to be at the end of milest…
Browse files Browse the repository at this point in the history
…ones

Summary: This is easier to config: just use [30, 60, 90, 120] instead of two separate configs

Reviewed By: theschnitz

Differential Revision: D27108999

fbshipit-source-id: f8ad25c62656c429d30ea29b7fa4dcbe960540a5
  • Loading branch information
ppwwyyxx authored and facebook-github-bot committed Apr 14, 2021
1 parent 7ce4d12 commit 3755562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detectron2/solver/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def build_lr_scheduler(
sched = WarmupParamScheduler(
sched,
cfg.SOLVER.WARMUP_FACTOR,
cfg.SOLVER.WARMUP_ITERS / cfg.SOLVER.MAX_ITER,
min(cfg.SOLVER.WARMUP_ITERS / cfg.SOLVER.MAX_ITER, 1.0),
cfg.SOLVER.WARMUP_METHOD,
)
return LRMultiplier(optimizer, multiplier=sched, max_iter=cfg.SOLVER.MAX_ITER)

0 comments on commit 3755562

Please sign in to comment.