class_docstr: Cosine learning rate decay
  lr = 0.05 * (math.cos(epoch * (math.pi / epochs)) + 1)
  Args:
      lr(float): initial learning rate
      step_each_epoch(int): steps each epoch
      epochs(int): total training epochs
class_docstr_tok: ["Cosine","learning","rate","decay","lr","=","0.05","*","(","math.cos","(","epoch","*","(","math.pi","\/","epochs",")",")","+","1",")","Args",":","lr","(","float",")",":","initial","learning","rate","step_each_epoch","(","int",")",":","steps","each","epoch","epochs","(","int",")",":","total","training","epochs"]
code: def __init__(self, lr, step_each_epoch, epochs, **kwargs):
      super(Cosine, self).__init__(
          learning_rate=lr,
          T_max=step_each_epoch * epochs,
      )
  
      self.update_specified = False
  
imports: import sys
  import math
  from paddle.optimizer.lr import LinearWarmup
  from paddle.optimizer.lr import PiecewiseDecay
  from paddle.optimizer.lr import CosineAnnealingDecay
  from paddle.optimizer.lr import ExponentialDecay
  import paddle
  import paddle.regularizer
  from copy import deepcopy
label_desc: Use image node_id 1 to create a new Cosine object from inherited base classes: CosineAnnealingDecay with example: obj = Cosine(lr, step_each_epoch, epochs)