class_docstr: Model Exponential Moving Average from https://github.com/rwightman/pytorch-image-models
  Keep a moving average of everything in the model state_dict (parameters and buffers).
  This is intended to allow functionality like
  https://www.tensorflow.org/api_docs/python/tf/train/ExponentialMovingAverage
  A smoothed version of the weights is necessary for some training schemes to perform well.
  This class is sensitive where it is initialized in the sequence of model init,
  GPU assignment and distributed training wrappers.
class_docstr_tok: ["Model","Exponential","Moving","Average","from","https",":","\/\/github.com\/rwightman\/pytorch-image-models","Keep","a","moving","average","of","everything","in","the","model","state_dict","(","parameters","and","buffers",")",".","This","is","intended","to","allow","functionality","like","https",":","\/\/www.tensorflow.org\/api_docs\/python\/tf\/train\/ExponentialMovingAverage","A","smoothed","version","of","the","weights","is","necessary","for","some","training","schemes","to","perform","well",".","This","class","is","sensitive","where","it","is","initialized","in","the","sequence","of","model","init",",","GPU","assignment","and","distributed","training","wrappers","."]
docstr: Args:
      model (nn.Module): model to apply EMA.
      decay (float): ema decay reate.
docstr_tok: ["Args",":","model","(","nn.Module",")",":","model","to","apply","EMA",".","decay","(","float",")",":","ema","decay","reate","."]
code: def __init__(self, model=None, decay=0.9996):
      """
      Args:
          model (nn.Module): model to apply EMA.
          decay (float): ema decay reate.
      """
      self.model = deepcopy(model)
      self.decay = decay
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import weakref
  from copy import deepcopy
  from .utils import get_bn_running_state_names
label_desc: Use image node_id 1 to create a new SimpleModelEMA object from inherited base classes: object with example: obj = SimpleModelEMA(model, decay)