class_docstr: Example: ::
  
      >>> from torchbearer import Trial
      >>> from torchbearer.callbacks import CyclicLR
  
      >>> # Example scheduler which cycles the learning rate between 0.01 and 0.1
      >>> scheduler = CyclicLR(0.01, 0.1)
      >>> trial = Trial(None, callbacks=[scheduler], metrics=['loss'], verbose=2).for_steps(10).for_val_steps(10).run(1)
  
  Args:
      monitor (str): The name of the quantity in metrics to monitor. (Default value = 'val_loss')
      step_on_batch (bool): If True, step will be called on each training iteration rather than on each epoch
  
  See:
      `PyTorch ReduceLROnPlateau <http://pytorch.org/docs/master/optim.html#torch.optim.lr_scheduler.ReduceLROnPlateau>`_
class_docstr_tok: ["Example",":",":",":",">",">",">","from","torchbearer","import","Trial",">",">",">","from","torchbearer.callbacks","import","CyclicLR",">",">",">","#","Example","scheduler","which","cycles","the","learning","rate","between","0.01","and","0.1",">",">",">","scheduler","=","CyclicLR","(","0.01",",","0.1",")",">",">",">","trial","=","Trial","(","None",",","callbacks=","[","scheduler","]",",","metrics=","[","'loss","'","]",",","verbose=2",")",".for_steps","(","10",")",".for_val_steps","(","10",")",".run","(","1",")","Args",":","monitor","(","str",")",":","The","name","of","the","quantity","in","metrics","to","monitor",".","(","Default","value","=","'val_loss","'",")","step_on_batch","(","bool",")",":","If","True",",","step","will","be","called","on","each","training","iteration","rather","than","on","each","epoch","See",":","`","PyTorch","ReduceLROnPlateau","<","http",":","\/\/pytorch.org\/docs\/master\/optim.html","#","torch.optim.lr_scheduler.ReduceLROnPlateau",">","`","_"]
code: def __init__(
      self,
      base_lr,
      max_lr,
      monitor="val_loss",
      step_size_up=2000,
      step_size_down=None,
      mode="triangular",
      gamma=1.0,
      scale_fn=None,
      scale_mode="cycle",
      cycle_momentum=True,
      base_momentum=0.8,
      max_momentum=0.9,
      step_on_batch=False,
  ):
      if _pytorch_version_gt("1.0.0"):  # CyclicLR is implemented
          super(CyclicLR, self).__init__(
              functools.partial(
                  torch.optim.lr_scheduler.CyclicLR,
                  base_lr=base_lr,
                  max_lr=max_lr,
                  step_size_up=step_size_up,
                  step_size_down=step_size_down,
                  mode=mode,
                  gamma=gamma,
                  scale_fn=scale_fn,
                  scale_mode=scale_mode,
                  cycle_momentum=cycle_momentum,
                  base_momentum=base_momentum,
                  max_momentum=max_momentum,
              ),
              monitor=monitor,
              step_on_batch=step_on_batch,
          )
      else:
          raise NotImplementedError(
              "CyclicLR scheduler was not implemented in PyTorch versions less than 1.1.0. "
              "Update PyTorch or use the CyclicLR callback from an older Torchbearer version."
          )
  
imports: import functools
  import warnings
  import torch
  import torchbearer
  from torchbearer.bases import get_metric, _pytorch_version_lt, _pytorch_version_gt
  from torchbearer.callbacks import Callback
label_desc: Use image node_id 1 to create a new CyclicLR object from inherited base classes: TorchScheduler with example: obj = CyclicLR(base_lr, max_lr, monitor, step_size_up, step_size_down, mode, gamma, scale_fn, scale_mode, cycle_momentum, base_momentum, max_momentum, step_on_batch)