Method
__init__
(self,
step_each_epoch,
milestones,
warmup_epoch=0,
gamma=0.1,
last_epoch=-1,
**kwargs)
Source from the content-addressed store, hash-verified
| 46 | |
| 47 | class MultiStepLR(object): |
| 48 | def __init__(self, |
| 49 | step_each_epoch, |
| 50 | milestones, |
| 51 | warmup_epoch=0, |
| 52 | gamma=0.1, |
| 53 | last_epoch=-1, |
| 54 | **kwargs): |
| 55 | super(MultiStepLR, self).__init__() |
| 56 | self.milestones = [step_each_epoch * e for e in milestones] |
| 57 | self.gamma = gamma |
| 58 | self.last_epoch = last_epoch |
| 59 | self.warmup_epoch = warmup_epoch |
| 60 | |
| 61 | def __call__(self, optimizer): |
| 62 | return lr_scheduler.LambdaLR(optimizer, self.lambda_func, self.last_epoch) |
Callers
nothing calls this directly
Tested by
no test coverage detected