class_docstr: Cosine learning rate decay.
  lr = eta_min + 0.5 * (learning_rate - eta_min) * (cos(epoch * (PI / epochs)) + 1)
  Args:
      args(Namespace): Arguments obtained from ArgumentParser.
      step_each_epoch(int): The number of steps in each epoch.
      last_epoch (int, optional):  The index of last epoch. Can be set to restart training.
          Default: -1, meaning initial learning rate.
code: def __init__(self, args, step_each_epoch, last_epoch=-1):
      super().__init__()
      if args.warmup_epochs >= args.epochs:
          args.warmup_epochs = args.epochs
      self.learning_rate = args.lr
      self.T_max = (args.epochs - args.warmup_epochs) * step_each_epoch
      self.eta_min = 0.0
      self.last_epoch = last_epoch
      self.warmup_steps = round(args.warmup_epochs * step_each_epoch)
      self.warmup_start_lr = args.warmup_start_lr
  
imports: import sys
  import logging
  import paddle
label_desc: Use image node_id 1 to create a new Cosine object  with example: obj = Cosine(args, step_each_epoch, last_epoch)