class_docstr: optimizer (Optimizer): Wrapped optimizer.
  first_cycle_steps (int): First cycle step size.
  cycle_mult(float): Cycle steps magnification. Default: -1.
  max_lr(float): First cycle's max learning rate. Default: 0.1.
  min_lr(float): Min learning rate. Default: 0.001.
  warmup_steps(int): Linear warmup step size. Default: 0.
  gamma(float): Decrease rate of max learning rate by cycle. Default: 1.
  last_epoch (int): The index of last epoch. Default: -1.
class_docstr_tok: ["optimizer","(","Optimizer",")",":","Wrapped","optimizer",".","first_cycle_steps","(","int",")",":","First","cycle","step","size",".","cycle_mult","(","float",")",":","Cycle","steps","magnification",".","Default",":","-1.","max_lr","(","float",")",":","First","cycle","'s","max","learning","rate",".","Default",":","0.1.","min_lr","(","float",")",":","Min","learning","rate",".","Default",":","0.001.","warmup_steps","(","int",")",":","Linear","warmup","step","size",".","Default",":","0.","gamma","(","float",")",":","Decrease","rate","of","max","learning","rate","by","cycle",".","Default",":","1.","last_epoch","(","int",")",":","The","index","of","last","epoch",".","Default",":","-1","."]
code: def get_lr(self):
      if self.step_in_cycle == -1:
          return self.base_lrs
      elif self.step_in_cycle < self.warmup_steps:
          return [
              (self.max_lr - base_lr)
              * self.step_in_cycle
              / self.warmup_steps
              + base_lr
              for base_lr in self.base_lrs
          ]
      else:
          return [
              base_lr
              + (self.max_lr - base_lr)
              * (
                  1
                  + math.cos(
                      math.pi
                      * (self.step_in_cycle - self.warmup_steps)
                      / (self.cur_cycle_steps - self.warmup_steps)
                  )
              )
              / 2
              for base_lr in self.base_lrs
          ]
  
file_path: espnet/espnet2/schedulers/cosine_anneal_warmup_restart.py
imports: import math
  import torch
  from torch.optim.lr_scheduler import _LRScheduler
  from espnet2.schedulers.abs_scheduler import AbsBatchStepScheduler
label_desc: Use image node_id 3 for calling the CosineAnnealingWarmupRestarts obj's underlying member method code with example usage: obj.get_lr() and returns: self, unknown, unknown