class_docstr: Cosine learning rate schedule.
class_docstr_tok: ["Cosine","learning","rate","schedule","."]
docstr: Build a CosineLrSchedule.
  
  Args:
    adjusted_lr: `float`, The initial learning rate.
    lr_warmup_init: `float`, The warm up learning rate.
    lr_warmup_step: `int`, The warm up step.
    total_steps: `int`, Total train steps.
docstr_tok: ["Build","a","CosineLrSchedule",".","Args",":","adjusted_lr",":","`","float","`",",","The","initial","learning","rate",".","lr_warmup_init",":","`","float","`",",","The","warm","up","learning","rate",".","lr_warmup_step",":","`","int","`",",","The","warm","up","step",".","total_steps",":","`","int","`",",","Total","train","steps","."]
code: def __init__(
      self,
      adjusted_lr: float,
      lr_warmup_init: float,
      lr_warmup_step: int,
      total_steps: int,
  ):
      """Build a CosineLrSchedule.
  
      Args:
        adjusted_lr: `float`, The initial learning rate.
        lr_warmup_init: `float`, The warm up learning rate.
        lr_warmup_step: `int`, The warm up step.
        total_steps: `int`, Total train steps.
      """
      super().__init__()
      logging.info("LR schedule method: cosine")
      self.adjusted_lr = adjusted_lr
      self.lr_warmup_init = lr_warmup_init
      self.lr_warmup_step = lr_warmup_step
      self.decay_steps = tf.cast(
          total_steps - lr_warmup_step, tf.float32
      )
  
file_path: DALI/docs/examples/use_cases/tensorflow/efficientdet/model/utils/optimizers.py
imports: from absl import logging
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new CosineLrSchedule object from inherited base classes: tf.optimizers.schedules with example: obj = CosineLrSchedule(adjusted_lr, lr_warmup_init, lr_warmup_step, total_steps)