| 28 | |
| 29 | |
| 30 | class SchedulerType(Enum): |
| 31 | LINEAR = "linear" |
| 32 | COSINE = "cosine" |
| 33 | COSINE_WITH_RESTARTS = "cosine_with_restarts" |
| 34 | POLYNOMIAL = "polynomial" |
| 35 | CONSTANT = "constant" |
| 36 | CONSTANT_WITH_WARMUP = "constant_with_warmup" |
| 37 | PIECEWISE_CONSTANT = "piecewise_constant" |
| 38 | |
| 39 | |
| 40 | def get_constant_schedule(optimizer: Optimizer, last_epoch: int = -1) -> LambdaLR: |