(self, current_step)
| 101 | return lr_scheduler.LambdaLR(optimizer, self.lambda_func, self.last_epoch) |
| 102 | |
| 103 | def lambda_func(self, current_step): |
| 104 | if current_step < self.warmup_epoch: |
| 105 | return float(current_step) / float(max(1, self.warmup_epoch)) |
| 106 | return max(0.0, float(self.epochs - current_step) / float(max(1, self.epochs - self.warmup_epoch))) |
| 107 | |
| 108 | |
| 109 | class CosineAnnealingLR(object): |
nothing calls this directly
no outgoing calls
no test coverage detected