class_docstr: Cosine learning rate decay
  
  Args:
      max_epochs (int): max epochs for the training process.
          if you commbine cosine decay with warmup, it is recommended that
          the max_iters is much larger than the warmup iter
      use_warmup (bool): whether to use warmup. Default: True.
      min_lr_ratio (float): minimum learning rate ratio. Default: 0.
      last_plateau_epochs (int): use minimum learning rate in
          the last few epochs. Default: 0.
class_docstr_tok: ["Cosine","learning","rate","decay","Args",":","max_epochs","(","int",")",":","max","epochs","for","the","training","process",".","if","you","commbine","cosine","decay","with","warmup",",","it","is","recommended","that","the","max_iters","is","much","larger","than","the","warmup","iter","use_warmup","(","bool",")",":","whether","to","use","warmup",".","Default",":","True",".","min_lr_ratio","(","float",")",":","minimum","learning","rate","ratio",".","Default",":","0.","last_plateau_epochs","(","int",")",":","use","minimum","learning","rate","in","the","last","few","epochs",".","Default",":","0","."]
code: def __init__(
      self,
      max_epochs=1000,
      use_warmup=True,
      min_lr_ratio=0.0,
      last_plateau_epochs=0,
  ):
      self.max_epochs = max_epochs
      self.use_warmup = use_warmup
      self.min_lr_ratio = min_lr_ratio
      self.last_plateau_epochs = last_plateau_epochs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import math
  import paddle
  import paddle.nn
  import paddle.optimizer
  import paddle.regularizer
  from ppdet.core.workspace import register, serializable
  import copy
  from .adamw import AdamWDL, build_adamwdl
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 1 to create a new CosineDecay object from inherited base classes: object with example: obj = CosineDecay(max_epochs, use_warmup, min_lr_ratio, last_plateau_epochs)