(self)
| 9 | super().__init__(optimizer, last_epoch) |
| 10 | |
| 11 | def get_lr(self): |
| 12 | if self.last_epoch < self.warmup_epochs: |
| 13 | return [base_lr * (self.last_epoch + 1) / self.warmup_epochs for base_lr in self.base_lrs] |
| 14 | |
| 15 | if self.base_scheduler is not None: |
| 16 | return self.base_scheduler.get_last_lr() |
| 17 | |
| 18 | return self.base_lrs |
| 19 | |
| 20 | def step(self, epoch=None): |
| 21 | if self.last_epoch < self.warmup_epochs: |
nothing calls this directly
no outgoing calls
no test coverage detected