class_docstr: Starts with a linear warmup lr schedule until it reaches N epochs and a flat lr schedule
  until it reaches M epochs then applies the specific scheduler (For example: ReduceLROnPlateau).
  
  Args:
      optimizer (:class:`torch.optim.Optimizer`): Wrapped optimizer.
      warmup_epochs (int): Number of epochs to linearly warmup lr until starting applying the scheduler.
      delay_epochs (int): Number of epochs to keep the initial lr until starting applying the scheduler.
      after_scheduler (:class:`torch.optim.lr_scheduler`): After target_epoch, use this scheduler.
      last_epoch (int, optional): The index of last epoch, defaults to -1. When last_epoch=-1,
          the schedule is started from the beginning or When last_epoch=-1, sets initial lr as lr.
class_docstr_tok: ["Starts","with","a","linear","warmup","lr","schedule","until","it","reaches","N","epochs","and","a","flat","lr","schedule","until","it","reaches","M","epochs","then","applies","the","specific","scheduler","(","For","example",":","ReduceLROnPlateau",")",".","Args",":","optimizer","(",":","class",":","`","torch.optim.Optimizer","`",")",":","Wrapped","optimizer",".","warmup_epochs","(","int",")",":","Number","of","epochs","to","linearly","warmup","lr","until","starting","applying","the","scheduler",".","delay_epochs","(","int",")",":","Number","of","epochs","to","keep","the","initial","lr","until","starting","applying","the","scheduler",".","after_scheduler","(",":","class",":","`","torch.optim.lr_scheduler","`",")",":","After","target_epoch",",","use","this","scheduler",".","last_epoch","(","int",",","optional",")",":","The","index","of","last","epoch",",","defaults","to","-1",".","When","last_epoch=-1",",","the","schedule","is","started","from","the","beginning","or","When","last_epoch=-1",",","sets","initial","lr","as","lr","."]
code: def state_dict(self):
      state_dict = {
          key: value
          for key, value in self.__dict__.items()
          if key not in "optimizer"
      }
      if isinstance(state_dict["after_scheduler"], _LRScheduler):
          state_dict["after_scheduler_type"] = type(
              state_dict["after_scheduler"]
          ).__name__
          state_dict["after_scheduler_dict"] = state_dict[
              "after_scheduler"
          ].state_dict()
          del state_dict["after_scheduler"]
      else:
          raise NotImplementedError()
      return state_dict
  
imports: import torch
  from packaging.version import Version
label_desc: Use image node_id 2 for calling the WarmupDelayerScheduler obj's underlying member method code with example usage: obj.state_dict() and returns: state_dict