class_docstr: Computes a running mean.
  
  In computation, samples can be provided individually or in chunks. A
  "chunk" of size M implies incorporating M samples into a single expectation
  computation at once, which is more efficient than one by one.
  
  `RunningMean` is meant to serve general streaming expectations.
  For a specialized version that fits streaming over MCMC samples, see
  `ExpectationsReducer` in `tfp.experimental.mcmc`.
docstr: Instantiates a `RunningMean`.
  
  Support batch accumulation of multiple independent running means.
  
  Args:
    num_samples: A `Tensor` counting the number of samples
      accumulated so far.
    mean: A `Tensor` broadcast-compatible with `num_samples` giving the
      current mean.
docstr_tok: ["Instantiates","a","`","RunningMean","`",".","Support","batch","accumulation","of","multiple","independent","running","means",".","Args",":","num_samples",":","A","`","Tensor","`","counting","the","number","of","samples","accumulated","so","far",".","mean",":","A","`","Tensor","`","broadcast-compatible","with","`","num_samples","`","giving","the","current","mean","."]
code: def __init__(self, num_samples, mean):
      """Instantiates a `RunningMean`.
  
      Support batch accumulation of multiple independent running means.
  
      Args:
        num_samples: A `Tensor` counting the number of samples
          accumulated so far.
        mean: A `Tensor` broadcast-compatible with `num_samples` giving the
          current mean.
      """
      self.num_samples = num_samples
      self.mean = mean
  
imports: import functools
  import math
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.mcmc import diagnostic
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new RunningMean object from inherited base classes: ACClass with example: obj = RunningMean(num_samples, mean)