code: def cosine_rate(now_step, total_step, end_lr_rate):
      rate = ((1 + math.cos(now_step * math.pi / total_step)) / 2) * (
          1 - end_lr_rate
      ) + end_lr_rate  # cosine
      return rate
  
file_path: deep-learning-for-image-processing/tensorflow_classification/ConvNeXt/utils.py
imports: import os
  import json
  import random
  import math
  import numpy
  import tensorflow
  import matplotlib.pyplot
label_desc: Use image node_id 3 for calling a global function with example usage: cosine_rate(now_step, total_step, end_lr_rate) and returns: rate