class_docstr: One Cycle learning rate decay
  Args:
      max_lr(float): Upper learning rate boundaries
      epochs(int): total training epochs
      step_each_epoch(int): steps each epoch
      anneal_strategy(str): {‘cos’, ‘linear’} Specifies the annealing strategy: “cos” for cosine annealing, “linear” for linear annealing. 
          Default: ‘cos’
      three_phase(bool): If True, use a third phase of the schedule to annihilate the learning rate according to ‘final_div_factor’ 
          instead of modifying the second phase (the first two phases will be symmetrical about the step indicated by ‘pct_start’).
      last_epoch (int, optional):  The index of last epoch. Can be set to restart training. Default: -1, means initial learning rate.
class_docstr_tok: ["One","Cycle","learning","rate","decay","Args",":","max_lr","(","float",")",":","Upper","learning","rate","boundaries","epochs","(","int",")",":","total","training","epochs","step_each_epoch","(","int",")",":","steps","each","epoch","anneal_strategy","(","str",")",":","{","\u2018","cos","\u2019",",","\u2018","linear","\u2019","}","Specifies","the","annealing","strategy",":","\u201c","cos","\u201d","for","cosine","annealing",",","\u201c","linear","\u201d","for","linear","annealing",".","Default",":","\u2018","cos","\u2019","three_phase","(","bool",")",":","If","True",",","use","a","third","phase","of","the","schedule","to","annihilate","the","learning","rate","according","to","\u2018","final_div_factor","\u2019","instead","of","modifying","the","second","phase","(","the","first","two","phases","will","be","symmetrical","about","the","step","indicated","by","\u2018","pct_start","\u2019",")",".","last_epoch","(","int",",","optional",")",":","The","index","of","last","epoch",".","Can","be","set","to","restart","training",".","Default",":","-1",",","means","initial","learning","rate","."]
code: def __init__(
      self,
      max_lr,
      epochs,
      step_each_epoch,
      anneal_strategy="cos",
      three_phase=False,
      warmup_epoch=0,
      last_epoch=-1,
      **kwargs,
  ):
      super(OneCycle, self).__init__()
      self.max_lr = max_lr
      self.epochs = epochs
      self.steps_per_epoch = step_each_epoch
      self.anneal_strategy = anneal_strategy
      self.three_phase = three_phase
      self.last_epoch = last_epoch
      self.warmup_epoch = round(warmup_epoch * step_each_epoch)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from paddle.optimizer import lr
  from .lr_scheduler import CyclicalCosineDecay, OneCycleDecay, TwoStepCosineDecay
label_desc: Use image node_id 1 to create a new OneCycle object from inherited base classes: object with example: obj = OneCycle(max_lr, epochs, step_each_epoch, anneal_strategy, three_phase, warmup_epoch, last_epoch)