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/
docstr: Calculate the learning rate.
docstr_tok: ["Calculate","the","learning","rate","."]
code: def clr(self):
      """Calculate the learning rate."""
      fraction_to_restart = self.batch_since_restart / (
          self.steps_per_epoch * self.cycle_length
      )
      lr = self.min_lr + 0.5 * (self.max_lr - self.min_lr) * (
          1 + np.cos(fraction_to_restart * np.pi)
      )
      return lr
  
file_path: ktrain/ktrain/lroptimize/sgdr.py
imports: from ..imports import *
label_desc: Use image node_id 2 for calling the SGDRScheduler obj's underlying member method code with example usage: obj.clr() and returns: lr