class_docstr: Cosine annealing learning rate scheduler with periodic restarts.
  # Usage
      ```python
          schedule = SGDRScheduler(min_lr=1e-7,
                                   max_lr=1e-1,
                                   steps_per_epoch=np.ceil(epoch_size/batch_size),
                                   lr_decay=0.9,
                                   cycle_length=1,
                                   mult_factor=2)
          model.fit(X_train, Y_train, epochs=100, callbacks=[schedule])
      ```
  # Arguments
      min_lr: The lower bound of the learning rate range for the experiment.
      max_lr: The upper bound of the learning rate range for the experiment.
      steps_per_epoch: Number of mini-batches in the dataset. Calculated as `np.ceil(epoch_size/batch_size)`.
      lr_decay: Reduce the max_lr after the completion of each cycle.
                Ex. To reduce the max_lr by 20% after each cycle, set this value to 0.8.
      cycle_length: Initial number of epochs in a cycle.
      mult_factor: Scale epochs_to_restart after each full cycle completion.
  # References
      Original paper: http://arxiv.org/abs/1608.03983
      Blog Post:      http://www.jeremyjordan.me/nn-learning-rate/
code: def __init__(
      self,
      min_lr,
      max_lr,
      steps_per_epoch,
      lr_decay=0.9,
      cycle_length=10,
      mult_factor=2,
  ):
      super(keras.callbacks.Callback, self).__init__()
      self.min_lr = min_lr
      self.max_lr = max_lr
      self.lr_decay = lr_decay
  
      self.batch_since_restart = 0
      self.next_restart = cycle_length
  
      self.steps_per_epoch = steps_per_epoch
  
      self.cycle_length = cycle_length
      self.mult_factor = mult_factor
  
      self.history = {}
  
file_path: ktrain/ktrain/lroptimize/sgdr.py
imports: from ..imports import *
label_desc: Use image node_id 1 to create a new SGDRScheduler object from inherited base classes: keras.callbacks with example: obj = SGDRScheduler(min_lr, max_lr, steps_per_epoch, lr_decay, cycle_length, mult_factor)