Method
__init__
(self,
step_each_epoch,
step_size,
warmup_epoch=0,
gamma=0.1,
last_epoch=-1,
**kwargs)
Source from the content-addressed store, hash-verified
| 23 | |
| 24 | class StepLR(object): |
| 25 | def __init__(self, |
| 26 | step_each_epoch, |
| 27 | step_size, |
| 28 | warmup_epoch=0, |
| 29 | gamma=0.1, |
| 30 | last_epoch=-1, |
| 31 | **kwargs): |
| 32 | super(StepLR, self).__init__() |
| 33 | self.step_size = step_each_epoch * step_size |
| 34 | self.gamma = gamma |
| 35 | self.last_epoch = last_epoch |
| 36 | self.warmup_epoch = warmup_epoch |
| 37 | |
| 38 | def __call__(self, optimizer): |
| 39 | return lr_scheduler.LambdaLR(optimizer, self.lambda_func, self.last_epoch) |
Tested by
no test coverage detected