class_docstr: Linear (constant) warm-up followed by cosine learning rate annealing
class_docstr_tok: ["Linear","(","constant",")","warm-up","followed","by","cosine","learning","rate","annealing"]
docstr: Linear ramp warmup + cos annealing
  
  Args:
      optimizer: torch optimizer
      T_max: max number of times scheduler is applied (~epochs)
      eta_min: min lr. Defaults to 0.
      last_epoch: last epoch. Defaults to -1.
      ramp_len: ramp length, should not be greater than T_max. Defaults to 10.
docstr_tok: ["Linear","ramp","warmup","+","cos","annealing","Args",":","optimizer",":","torch","optimizer","T_max",":","max","number","of","times","scheduler","is","applied","(","~epochs",")","eta_min",":","min","lr",".","Defaults","to","0.","last_epoch",":","last","epoch",".","Defaults","to","-1.","ramp_len",":","ramp","length",",","should","not","be","greater","than","T_max",".","Defaults","to","10","."]
code: def __init__(
      self,
      optimizer: torch.optim.Optimizer,
      T_max: int,
      eta_min: float = 0,
      last_epoch: int = -1,
      ramp_len: int = 10,
  ):
      """Linear ramp warmup + cos annealing
  
      Args:
          optimizer: torch optimizer
          T_max: max number of times scheduler is applied (~epochs)
          eta_min: min lr. Defaults to 0.
          last_epoch: last epoch. Defaults to -1.
          ramp_len: ramp length, should not be greater than T_max. Defaults to 10.
      """
      self.T_max = T_max
      self.eta_min = eta_min
      self.ramp_len = ramp_len
      super().__init__(optimizer, last_epoch)
  
file_path: NeuralCompression/projects/torch_vct/utils/schedulers.py
imports: import math
  import torch
label_desc: Use image node_id 1 to create a new LinearWarmUpCosineLR object from inherited base classes: torch.optim.lr_scheduler with example: obj = LinearWarmUpCosineLR(optimizer, T_max, eta_min, last_epoch, ramp_len)