class_docstr: Decay the LR by a factor every time the validation loss plateaus.
class_docstr_tok: ["Decay","the","LR","by","a","factor","every","time","the","validation","loss","plateaus","."]
code: def __init__(
      self,
      optimizer,
      decay_rate=0.1,
      patience_t=10,
      verbose=True,
      threshold=1e-4,
      cooldown_t=0,
      warmup_t=0,
      warmup_lr_init=0,
      lr_min=0,
      mode="max",
      noise_range_t=None,
      noise_type="normal",
      noise_pct=0.67,
      noise_std=1.0,
      noise_seed=None,
      initialize=True,
  ):
      super().__init__(
          optimizer,
          "lr",
          noise_range_t=noise_range_t,
          noise_type=noise_type,
          noise_pct=noise_pct,
          noise_std=noise_std,
          noise_seed=noise_seed,
          initialize=initialize,
      )
  
      self.lr_scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(
          self.optimizer,
          patience=patience_t,
          factor=decay_rate,
          verbose=verbose,
          threshold=threshold,
          cooldown=cooldown_t,
          mode=mode,
          min_lr=lr_min,
      )
  
      self.warmup_t = warmup_t
      self.warmup_lr_init = warmup_lr_init
      if self.warmup_t:
          self.warmup_steps = [
              (v - warmup_lr_init) / self.warmup_t
              for v in self.base_values
          ]
          super().update_groups(self.warmup_lr_init)
      else:
          self.warmup_steps = [1 for _ in self.base_values]
      self.restore_lr = None
  
file_path: pytorch-image-models/timm/scheduler/plateau_lr.py
imports: import torch
  from .scheduler import Scheduler
label_desc: Use image node_id 1 to create a new PlateauLRScheduler object from inherited base classes: Scheduler with example: obj = PlateauLRScheduler(optimizer, decay_rate, patience_t, verbose, threshold, cooldown_t, warmup_t, warmup_lr_init, lr_min, mode, noise_range_t, noise_type, noise_pct, noise_std, noise_seed, initialize)