(self)
| 25 | self.gamma = gamma |
| 26 | |
| 27 | def get_lr(self) -> Tensor: |
| 28 | if self.epoch_counter.numpy()[0] not in self.milestones: |
| 29 | return self.optimizer.lr |
| 30 | return self.optimizer.lr * self.gamma |
| 31 | |
| 32 | class ReduceLROnPlateau(LR_Scheduler): |
| 33 | def __init__(self, optimizer: Optimizer, mode="min", factor=0.1, patience=10, threshold=1e-4, threshold_mode="rel"): |