class_docstr: Maintains an exponential moving average.
  
  This uses the Adam debiasing procedure.
  See https://arxiv.org/pdf/1412.6980.pdf for details.
class_docstr_tok: ["Maintains","an","exponential","moving","average",".","This","uses","the","Adam","debiasing","procedure",".","See","https",":","\/\/arxiv.org\/pdf\/1412.6980.pdf","for","details","."]
docstr: If uninitialized sets the average to ``zeros`` of the given shape/dtype.
docstr_tok: ["If","uninitialized","sets","the","average","to","``","zeros","``","of","the","given","shape\/dtype","."]
code: def initialize(self, shape, dtype=jnp.float32):
      """If uninitialized sets the average to ``zeros`` of the given shape/dtype."""
      if hasattr(shape, "shape"):
          warnings.warn(
              "Passing a value into initialize instead of a shape/dtype "
              "is deprecated. Update your code to use: "
              "`ema.initialize(v.shape, v.dtype)`.",
              category=DeprecationWarning,
          )
          shape, dtype = shape.shape, shape.dtype
  
      hk.get_state("hidden", shape, dtype, init=jnp.zeros)
      hk.get_state("average", shape, dtype, init=jnp.zeros)
  
imports: import re
  from typing import Optional, Union
  import warnings
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import initializers
  from haiku._src import module
  import jax
  import jax.numpy
label_desc: Use image node_id 2 for calling the ExponentialMovingAverage obj's underlying member method code with example usage: obj.initialize(shape, dtype) without return types