class_docstr: Multiplies your *base* `max_grad_norm` by the output of a `scheduler_function` given
  as input.
  Note: the base max_grad_norm is recorded as the max_grad_norm your optimizer had set at
  the very beginning. This means that the factors from the `scheduler_function` will *not*
  accumulate, unlike in ExponentialGradClip. If you want some exponential-like behavior,
  accumulation logic will have to be added in your `scheduler_function`.
  
  When last_epoch=-1, sets initial max_grad_norm as max_grad_norm.
class_docstr_tok: ["Multiplies","your","*","base","*","`","max_grad_norm","`","by","the","output","of","a","`","scheduler_function","`","given","as","input",".","Note",":","the","base","max_grad_norm","is","recorded","as","the","max_grad_norm","your","optimizer","had","set","at","the","very","beginning",".","This","means","that","the","factors","from","the","`","scheduler_function","`","will","*","not","*","accumulate",",","unlike","in","ExponentialGradClip",".","If","you","want","some","exponential-like","behavior",",","accumulation","logic","will","have","to","be","added","in","your","`","scheduler_function","`",".","When","last_epoch=-1",",","sets","initial","max_grad_norm","as","max_grad_norm","."]
docstr: Args:
      optimizer: Wrapped optimizer.
      scheduler_function: A function which computes a multiplicative factor given
          an integer epoch
      last_epoch: The index of last epoch. Default: -1.
docstr_tok: ["Args",":","optimizer",":","Wrapped","optimizer",".","scheduler_function",":","A","function","which","computes","a","multiplicative","factor","given","an","integer","epoch","last_epoch",":","The","index","of","last","epoch",".","Default",":","-1","."]
code: def __init__(
      self,
      optimizer: DPOptimizer,
      *,
      scheduler_function: Callable[[int], float],
      last_epoch: int = -1,
  ):
      """
  
      Args:
          optimizer: Wrapped optimizer.
          scheduler_function: A function which computes a multiplicative factor given
              an integer epoch
          last_epoch: The index of last epoch. Default: -1.
      """
      self.scheduler_function = scheduler_function
      self.base_max_grad_norm = optimizer.max_grad_norm
      super().__init__(optimizer, last_epoch=last_epoch)
  
file_path: opacus/opacus/schedulers/grad_clip_scheduler.py
imports: from typing import Callable, Dict
  from opacus.optimizers import DPOptimizer
label_desc: Use image node_id 1 to create a new LambdaGradClip object from inherited base classes: _GradClipScheduler with example: obj = LambdaGradClip(optimizer)