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: Prepares the optimizer for training.
  
  Deriving classes should initialize the underlying PyTorch
  :class:`torch.optim.Optimizer` in this call. The param_groups argument
  follows the same format supported by PyTorch (list of parameters, or
  list of param group dictionaries).
  
  Warning:
      This should called only after the model has been moved to the correct
      device.
docstr_tok: ["Prepares","the","optimizer","for","training",".","Deriving","classes","should","initialize","the","underlying","PyTorch",":","class",":","`","torch.optim.Optimizer","`","in","this","call",".","The","param_groups","argument","follows","the","same","format","supported","by","PyTorch","(","list","of","parameters",",","or","list","of","param","group","dictionaries",")",".","Warning",":","This","should","called","only","after","the","model","has","been","moved","to","the","correct","device","."]
code: def prepare(self, param_groups):
      """
      Prepares the optimizer for training.
  
      Deriving classes should initialize the underlying PyTorch
      :class:`torch.optim.Optimizer` in this call. The param_groups argument
      follows the same format supported by PyTorch (list of parameters, or
      list of param group dictionaries).
  
      Warning:
          This should called only after the model has been moved to the correct
          device.
      """
      raise NotImplementedError
  
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 3 for calling the ClassyOptimizer obj's underlying member method code with example usage: obj.prepare(param_groups) without return types