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: Record previous batch statistics and update the learning rate.
docstr_tok: ["Record","previous","batch","statistics","and","update","the","learning","rate","."]
code: def on_batch_end(self, batch, logs={}):
      """Record previous batch statistics and update the learning rate."""
      logs = logs or {}
      self.history.setdefault("lr", []).append(
          K.get_value(self.model.optimizer.lr)
      )
      for k, v in logs.items():
          self.history.setdefault(k, []).append(v)
  
      self.batch_since_restart += 1
      K.set_value(self.model.optimizer.lr, self.clr())
  
file_path: ktrain/ktrain/lroptimize/sgdr.py
imports: from ..imports import *
label_desc: Use image node_id 4 for calling the SGDRScheduler obj's underlying member method code with example usage: obj.on_batch_end(batch, logs) without return types