MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/lr_scheduler/base.py:170–181  ·  view source on GitHub ↗
(self, optimizer, max_iter, warmup_iters,
                 warmup_factor=1e-2, warmup_method="linear", last_iter=-1, base_lr=0.8, power=0.9)

Source from the content-addressed store, hash-verified

168
169class WarmupPolyLRScheduler(_WarmUpLRScheduler):
170 def __init__(self, optimizer, max_iter, warmup_iters,
171 warmup_factor=1e-2, warmup_method="linear", last_iter=-1, base_lr=0.8, power=0.9):
172 super(WarmupPolyLRScheduler, self).__init__(optimizer, warmup_factor*base_lr, base_lr, warmup_iters, last_iter)
173 if warmup_method not in ("constant", "linear"):
174 raise ValueError(f"Only 'constant' or 'linear' warmup_method accepted. Got {warmup_method}")
175
176 self.max_iter = max_iter
177 self.warmup_factor = warmup_factor
178 self.warmup_iters = warmup_iters
179 self.warmup_method = warmup_method
180
181 self.power = power
182
183 def _get_new_lr(self):
184 warmup_factor = 1

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected