class_docstr: Base class for optimizers.
  
  This wraps a :class:`torch.optim.Optimizer` instance and provides support
  for parameter scheduling. Typical PyTorch optimizers are used like this:
  
      optim = SGD(model.parameters(), lr=0.1)
  
  but the user is responsible for updating lr over the course of training.
  ClassyOptimizers extend PyTorch optimizers and allow specifying
  ParamSchedulers instead:
  
      optim = SGD()
      optim.set_param_groups(model.parameters(), lr=LinearParamScheduler(1, 2))
  
  This means that as you step through the optimizer, the learning rate will
  automatically get updated with the given schedule. To access the current
  learning rate value (or any other optimizer option), you can read
  `optim.options_view.lr`. Similar to other Classy abstractions, you can also
  instantiate ClassyOptimizers from a configuration file.
class_docstr_tok: ["Base","class","for","optimizers",".","This","wraps","a",":","class",":","`","torch.optim.Optimizer","`","instance","and","provides","support","for","parameter","scheduling",".","Typical","PyTorch","optimizers","are","used","like","this",":","optim","=","SGD","(","model.parameters","(",")",",","lr=0.1",")","but","the","user","is","responsible","for","updating","lr","over","the","course","of","training",".","ClassyOptimizers","extend","PyTorch","optimizers","and","allow","specifying","ParamSchedulers","instead",":","optim","=","SGD","(",")","optim.set_param_groups","(","model.parameters","(",")",",","lr=LinearParamScheduler","(","1",",","2",")",")","This","means","that","as","you","step","through","the","optimizer",",","the","learning","rate","will","automatically","get","updated","with","the","given","schedule",".","To","access","the","current","learning","rate","value","(","or","any","other","optimizer","option",")",",","you","can","read","`","optim.options_view.lr","`",".","Similar","to","other","Classy","abstractions",",","you","can","also","instantiate","ClassyOptimizers","from","a","configuration","file","."]
docstr: Constructor for ClassyOptimizer.
  
  :var options_view: provides convenient access to current values of
      learning rate, momentum etc.
  :var _param_group_schedulers: list of dictionaries in the param_groups
      format, containing all ParamScheduler instances needed. Constant
      values are converted to ConstantParamScheduler before being inserted
      here.
docstr_tok: ["Constructor","for","ClassyOptimizer",".",":","var","options_view",":","provides","convenient","access","to","current","values","of","learning","rate",",","momentum","etc",".",":","var","_param_group_schedulers",":","list","of","dictionaries","in","the","param_groups","format",",","containing","all","ParamScheduler","instances","needed",".","Constant","values","are","converted","to","ConstantParamScheduler","before","being","inserted","here","."]
code: def __init__(self) -> None:
      """Constructor for ClassyOptimizer.
  
      :var options_view: provides convenient access to current values of
          learning rate, momentum etc.
      :var _param_group_schedulers: list of dictionaries in the param_groups
          format, containing all ParamScheduler instances needed. Constant
          values are converted to ConstantParamScheduler before being inserted
          here.
      """
      self.options_view = OptionsView(self)
      self.optimizer = None
      self._param_group_schedulers = None
      log_class_usage("Optimizer", self.__class__)
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Callable, Dict, Optional
  from classy_vision.generic.util import log_class_usage
  from .param_scheduler import ConstantParamScheduler, ParamScheduler, UpdateInterval
label_desc: Use image node_id 1 to create a new ClassyOptimizer object from inherited base classes: ABC with example: obj = ClassyOptimizer()