class_docstr: Base class of a learning rate scheduler.
  
  A scheduler returns a new learning rate based on the number of updates that have
  been performed.
  
  Parameters
  ----------
  base_lr : float, optional
      The initial learning rate.
  warmup_steps: int
      number of warmup steps used before this scheduler starts decay
  warmup_begin_lr: float
      if using warmup, the learning rate from which it starts warming up
  warmup_mode: string
      warmup can be done in two modes.
      'linear' mode gradually increases lr with each step in equal increments
      'constant' mode keeps lr at warmup_begin_lr for warmup_steps
code: def __init__(
      self,
      base_lr=0.01,
      warmup_steps=0,
      warmup_begin_lr=0,
      warmup_mode="linear",
  ):
      self.base_lr = base_lr
      assert isinstance(warmup_steps, int)
      self.warmup_steps = warmup_steps
  
      self.warmup_final_lr = base_lr
      self.warmup_begin_lr = warmup_begin_lr
      if self.warmup_begin_lr > self.warmup_final_lr:
          raise ValueError(
              "Base lr has to be higher than warmup_begin_lr"
          )
      if self.warmup_steps < 0:
          raise ValueError("Warmup steps has to be positive or 0")
      if warmup_mode not in ["linear", "constant"]:
          raise ValueError(
              "Supports only linear and constant modes of warmup"
          )
      self.warmup_mode = warmup_mode
  
imports: import logging
  from math import cos, pi
label_desc: Use image node_id 1 to create a new LRScheduler object from inherited base classes: object with example: obj = LRScheduler(base_lr, warmup_steps, warmup_begin_lr, warmup_mode)