class_docstr: Implements RMSprop algorithm.
  
  NOTE: This code is copied from :class:`torch.optim.RMSProp`, with the epsilon
  moved inside the square root to match tensorflow's implementation.
  
  Proposed by G. Hinton in his
  `course <http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf>`_.
  
  The centered version first appears in `Generating Sequences
  With Recurrent Neural Networks <https://arxiv.org/pdf/1308.0850v5.pdf>`_.
  
  The implementation here takes the square root of the gradient average before
  adding epsilon (note that TensorFlow interchanges these two operations). The
  effective learning rate is thus :math:`\alpha/(\sqrt{v} + \epsilon)` where
  :math:`\alpha` is the scheduled learning rate and :math:`v` is the weighted moving
  average of the squared gradient.
  
  Arguments:
      params (iterable): iterable of parameters to optimize or dicts defining
          parameter groups
      lr (float, optional): learning rate (default: 1e-2)
      momentum (float, optional): momentum factor (default: 0)
      alpha (float, optional): smoothing constant (default: 0.99)
      eps (float, optional): term added to the square root in the denominator to
          improve numerical stability (default: 1e-8)
      centered (bool, optional) : if ``True``, compute the centered RMSProp,
          the gradient is normalized by an estimation of its variance
      weight_decay (float, optional): weight decay (L2 penalty) (default: 0)
class_docstr_tok: ["Implements","RMSprop","algorithm",".","NOTE",":","This","code","is","copied","from",":","class",":","`","torch.optim.RMSProp","`",",","with","the","epsilon","moved","inside","the","square","root","to","match","tensorflow","'s","implementation",".","Proposed","by","G.","Hinton","in","his","`","course","<","http",":","\/\/www.cs.toronto.edu\/~tijmen\/csc321\/slides\/lecture_slides_lec6.pdf",">","`","_",".","The","centered","version","first","appears","in","`","Generating","Sequences","With","Recurrent","Neural","Networks","<","https",":","\/\/arxiv.org\/pdf\/1308.0850v5.pdf",">","`","_",".","The","implementation","here","takes","the","square","root","of","the","gradient","average","before","adding","epsilon","(","note","that","TensorFlow","interchanges","these","two","operations",")",".","The","effective","learning","rate","is","thus",":","math",":","`","\\alpha\/","(","\\sqrt","{","v","}","+","\\epsilon",")","`","where",":","math",":","`","\\alpha","`","is","the","scheduled","learning","rate","and",":","math",":","`","v","`","is","the","weighted","moving","average","of","the","squared","gradient",".","Arguments",":","params","(","iterable",")",":","iterable","of","parameters","to","optimize","or","dicts","defining","parameter","groups","lr","(","float",",","optional",")",":","learning","rate","(","default",":","1e-2",")","momentum","(","float",",","optional",")",":","momentum","factor","(","default",":","0",")","alpha","(","float",",","optional",")",":","smoothing","constant","(","default",":","0.99",")","eps","(","float",",","optional",")",":","term","added","to","the","square","root","in","the","denominator","to","improve","numerical","stability","(","default",":","1e-8",")","centered","(","bool",",","optional",")",":","if","``","True","``",",","compute","the","centered","RMSProp",",","the","gradient","is","normalized","by","an","estimation","of","its","variance","weight_decay","(","float",",","optional",")",":","weight","decay","(","L2","penalty",")","(","default",":","0",")"]
code: def __setstate__(self, state):
      super().__setstate__(state)
      for group in self.param_groups:
          group.setdefault("momentum", 0)
          group.setdefault("centered", False)
  
file_path: ClassyVision/classy_vision/optim/rmsprop_tf.py
imports: from typing import Any, Dict
  import torch.optim
  from classy_vision.generic.util import is_pos_float
  from torch.optim import Optimizer
  from .None import ClassyOptimizer, register_optimizer
label_desc: Use image node_id 2 for calling the RMSpropTFOptimizer obj's underlying member method code with example usage: obj.__setstate__(state) without return types