class_docstr: Gradually warm-up(increasing) learning rate in optimizer.
  Proposed in 'Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour'.
  
  Args:
      optimizer (Optimizer): Wrapped optimizer.
      multiplier: target learning rate = base lr * multiplier if multiplier > 1.0. if multiplier = 1.0, lr starts from 0 and ends up with the base_lr.
      total_epoch: target learning rate is reached at total_epoch, gradually
      after_scheduler: after target_epoch, use this scheduler(eg. ReduceLROnPlateau)
class_docstr_tok: ["Gradually","warm-up","(","increasing",")","learning","rate","in","optimizer",".","Proposed","in","'Accurate",",","Large","Minibatch","SGD",":","Training","ImageNet","in","1","Hour","'",".","Args",":","optimizer","(","Optimizer",")",":","Wrapped","optimizer",".","multiplier",":","target","learning","rate","=","base","lr","*","multiplier","if","multiplier",">","1.0.","if","multiplier","=","1.0",",","lr","starts","from","0","and","ends","up","with","the","base_lr",".","total_epoch",":","target","learning","rate","is","reached","at","total_epoch",",","gradually","after_scheduler",":","after","target_epoch",",","use","this","scheduler","(","eg",".","ReduceLROnPlateau",")"]
code: def step_ReduceLROnPlateau(self, metrics, epoch=None):
      if epoch is None:
          epoch = self.last_epoch + 1
      self.last_epoch = (
          epoch if epoch != 0 else 1
      )  # ReduceLROnPlateau is called at the end of epoch, whereas others are called at beginning
      if self.last_epoch <= self.total_epoch:
          warmup_lr = [
              base_lr
              * (
                  (self.multiplier - 1.0)
                  * self.last_epoch
                  / self.total_epoch
                  + 1.0
              )
              for base_lr in self.base_lrs
          ]
          for param_group, lr in zip(
              self.optimizer.param_groups, warmup_lr
          ):
              param_group["lr"] = lr
      else:
          if epoch is None:
              self.after_scheduler.step(metrics, None)
          else:
              self.after_scheduler.step(
                  metrics, epoch - self.total_epoch
              )
  
imports: import math
  import warnings
  import numpy
  from torch import nn
  from torch.optim.optimizer import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler, LambdaLR, ExponentialLR, CyclicLR, MultiStepLR, ReduceLROnPlateau, CosineAnnealingLR, CosineAnnealingWarmRestarts
label_desc: Use image node_id 3 for calling the GradualWarmupScheduler obj's underlying member method code with example usage: obj.step_ReduceLROnPlateau(metrics, epoch) without return types