class_docstr: Maintains (exponential) moving average of a set of parameters.
  Args:
      parameters: Iterable of `torch.nn.Parameter` (typically from
          `model.parameters()`).
      decay: The exponential decay.
      use_num_updates: Whether to use number of updates when computing
          averages.
class_docstr_tok: ["Maintains","(","exponential",")","moving","average","of","a","set","of","parameters",".","Args",":","parameters",":","Iterable","of","`","torch.nn.Parameter","`","(","typically","from","`","model.parameters","(",")","`",")",".","decay",":","The","exponential","decay",".","use_num_updates",":","Whether","to","use","number","of","updates","when","computing","averages","."]
docstr: Copy current averaged parameters into given collection of parameters.
  Args:
      parameters: Iterable of `torch.nn.Parameter`; the parameters to be
          updated with the stored moving averages. If `None`, the
          parameters with which this `ExponentialMovingAverage` was
          initialized will be used.
docstr_tok: ["Copy","current","averaged","parameters","into","given","collection","of","parameters",".","Args",":","parameters",":","Iterable","of","`","torch.nn.Parameter","`",";","the","parameters","to","be","updated","with","the","stored","moving","averages",".","If","`","None","`",",","the","parameters","with","which","this","`","ExponentialMovingAverage","`","was","initialized","will","be","used","."]
code: def copy_to(
      self, parameters: Optional[Iterable[torch.nn.Parameter]] = None
  ) -> None:
      """
      Copy current averaged parameters into given collection of parameters.
      Args:
          parameters: Iterable of `torch.nn.Parameter`; the parameters to be
              updated with the stored moving averages. If `None`, the
              parameters with which this `ExponentialMovingAverage` was
              initialized will be used.
      """
      parameters = self._get_parameters(parameters)
      for s_param, param in zip(self.shadow_params, parameters):
          if param.requires_grad:
              param.data.copy_(s_param.data)
  
file_path: zoo/src/utils/ema.py
imports: from __future__ import division
  from __future__ import unicode_literals
  from typing import Iterable, Optional
  import weakref
  import copy
  import contextlib
  import torch
label_desc: Use image node_id 4 for calling the ExponentialMovingAverage obj's underlying member method code with example usage: obj.copy_to(parameters) without return types