Method
__init__
(self, optimizer, num_steps, decay=0.5, warmup=0., min_lr=0.,
last_epoch=-1, verbose=False)
Source from the content-addressed store, hash-verified
| 212 | """ |
| 213 | |
| 214 | def __init__(self, optimizer, num_steps, decay=0.5, warmup=0., min_lr=0., |
| 215 | last_epoch=-1, verbose=False): |
| 216 | self.num_steps = num_steps |
| 217 | self.decay = decay |
| 218 | if not 0. <= warmup < 1: |
| 219 | raise ValueError('Invalid value for warmup') |
| 220 | self.warmup = warmup |
| 221 | self.min_lr = min_lr |
| 222 | super().__init__(optimizer, last_epoch, verbose) |
| 223 | |
| 224 | def get_lr(self): |
| 225 | if not self._get_lr_called_within_step: |
Callers
nothing calls this directly
Tested by
no test coverage detected