class_docstr: Linear warmup and then cosine decay.
  Based on https://huggingface.co/ implementation.
class_docstr_tok: ["Linear","warmup","and","then","cosine","decay",".","Based","on","https",":","\/\/huggingface.co\/","implementation","."]
docstr: Args:
      optimizer: wrapped optimizer.
      warmup_steps: number of warmup iterations.
      t_total: total number of training iterations.
      end_lr: the final learning rate. Defaults to 0.0.
      cycles: cosine cycles parameter.
      last_epoch: the index of last epoch.
      warmup_multiplier: if provided, starts the linear warmup from this fraction of the initial lr.
          Must be in 0..1 interval. Defaults to 0
  Returns:
      None
docstr_tok: ["Args",":","optimizer",":","wrapped","optimizer",".","warmup_steps",":","number","of","warmup","iterations",".","t_total",":","total","number","of","training","iterations",".","end_lr",":","the","final","learning","rate",".","Defaults","to","0.0.","cycles",":","cosine","cycles","parameter",".","last_epoch",":","the","index","of","last","epoch",".","warmup_multiplier",":","if","provided",",","starts","the","linear","warmup","from","this","fraction","of","the","initial","lr",".","Must","be","in","0","..","1","interval",".","Defaults","to","0","Returns",":","None"]
code: def __init__(
      self,
      optimizer: Optimizer,
      warmup_steps: int,
      t_total: int,
      end_lr: float = 0.0,
      cycles: float = 0.5,
      last_epoch: int = -1,
      warmup_multiplier: float = 0,
  ) -> None:
      """
      Args:
          optimizer: wrapped optimizer.
          warmup_steps: number of warmup iterations.
          t_total: total number of training iterations.
          end_lr: the final learning rate. Defaults to 0.0.
          cycles: cosine cycles parameter.
          last_epoch: the index of last epoch.
          warmup_multiplier: if provided, starts the linear warmup from this fraction of the initial lr.
              Must be in 0..1 interval. Defaults to 0
      Returns:
          None
      """
      self.warmup_steps = min(max(warmup_steps, 0), t_total)
      self.warmup_multiplier = warmup_multiplier
      self.t_total = t_total
      self.cycles = cycles
      self.end_lr = end_lr
      if warmup_multiplier < 0 or warmup_multiplier > 1:
          raise ValueError("warmup_multiplier must be in 0..1 range")
      super().__init__(optimizer, self.lr_lambda, last_epoch)
  
file_path: MONAI/monai/optimizers/lr_scheduler.py
imports: from __future__ import annotations
  import math
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import LambdaLR, _LRScheduler
label_desc: Use image node_id 1 to create a new WarmupCosineSchedule object from inherited base classes: LambdaLR with example: obj = WarmupCosineSchedule(optimizer, warmup_steps, t_total, end_lr, cycles, last_epoch, warmup_multiplier)