class_docstr: The WarmupStepLR scheduler.
  
  This scheduler is the combination of WarmupLR and StepLR:
  
  WarmupLR:
      lr = optimizer.lr * warmup_step ** 0.5
           * min(step ** -0.5, step * warmup_step ** -1.5)
  WarmupStepLR:
      if step <= warmup_step:
          lr = optimizer.lr * warmup_step ** 0.5
               * min(step ** -0.5, step * warmup_step ** -1.5)
      else:
          lr = optimizer.lr * (gamma ** (epoch//step_size))
  
  Note that the maximum lr equals to optimizer.lr in this scheduler.
class_docstr_tok: ["The","WarmupStepLR","scheduler",".","This","scheduler","is","the","combination","of","WarmupLR","and","StepLR",":","WarmupLR",":","lr","=","optimizer.lr","*","warmup_step","*","*","0.5","*","min","(","step","*","*","-0.5",",","step","*","warmup_step","*","*","-1.5",")","WarmupStepLR",":","if","step","<","=","warmup_step",":","lr","=","optimizer.lr","*","warmup_step","*","*","0.5","*","min","(","step","*","*","-0.5",",","step","*","warmup_step","*","*","-1.5",")","else",":","lr","=","optimizer.lr","*","(","gamma","*","*","(","epoch\/\/step_size",")",")","Note","that","the","maximum","lr","equals","to","optimizer.lr","in","this","scheduler","."]
code: def get_lr(self):
      self.step_num += 1
      if self.step_num % self.steps_per_epoch == 0:
          self.epoch_num += 1
  
      if self.step_num <= self.warmup_steps:
          return [
              lr * self.lr_scale * self.step_num for lr in self.base_lrs
          ]
      else:
          return [
              lr
              * self.gamma
              ** (
                  (self.epoch_num - self.warmup_epoch) // self.step_size
              )
              for lr in self.base_lrs
          ]
  
file_path: espnet/espnet2/schedulers/warmup_step_lr.py
imports: from typing import Union
  import torch
  from torch.optim.lr_scheduler import _LRScheduler
  from typeguard import check_argument_types
  from espnet2.schedulers.abs_scheduler import AbsBatchStepScheduler
label_desc: Use image node_id 3 for calling the WarmupStepLR obj's underlying member method code with example usage: obj.get_lr() and returns: unknown, unknown