docstr: calulates the running mean and std of a data stream
  https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
  
  :param epsilon: (float) helps with arithmetic issues
  :param shape: (tuple) the shape of the data stream's output
docstr_tok: ["calulates","the","running","mean","and","std","of","a","data","stream","https",":","\/\/en.wikipedia.org\/wiki\/Algorithms_for_calculating_variance","#","Parallel_algorithm",":","param","epsilon",":","(","float",")","helps","with","arithmetic","issues",":","param","shape",":","(","tuple",")","the","shape","of","the","data","stream","'s","output"]
code: def __init__(self, epsilon=1e-2, shape=()):
      """
      calulates the running mean and std of a data stream
      https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
  
      :param epsilon: (float) helps with arithmetic issues
      :param shape: (tuple) the shape of the data stream's output
      """
      self._sum = tf.get_variable(
          dtype=tf.float64,
          shape=shape,
          initializer=tf.constant_initializer(0.0),
          name="runningsum",
          trainable=False,
      )
      self._sumsq = tf.get_variable(
          dtype=tf.float64,
          shape=shape,
          initializer=tf.constant_initializer(epsilon),
          name="runningsumsq",
          trainable=False,
      )
      self._count = tf.get_variable(
          dtype=tf.float64,
          shape=(),
          initializer=tf.constant_initializer(epsilon),
          name="count",
          trainable=False,
      )
      self.shape = shape
  
      self.mean = tf.cast(self._sum / self._count, tf.float32)
      self.std = tf.sqrt(
          tf.maximum(
              tf.cast(self._sumsq / self._count, tf.float32)
              - tf.square(self.mean),
              1e-2,
          )
      )
  
      newsum = tf.placeholder(
          shape=self.shape, dtype=tf.float64, name="sum"
      )
      newsumsq = tf.placeholder(
          shape=self.shape, dtype=tf.float64, name="var"
      )
      newcount = tf.placeholder(
          shape=[], dtype=tf.float64, name="count"
      )
      self.incfiltparams = tf_util.function(
          [newsum, newsumsq, newcount],
          [],
          updates=[
              tf.assign_add(self._sum, newsum),
              tf.assign_add(self._sumsq, newsumsq),
              tf.assign_add(self._count, newcount),
          ],
      )
  
file_path: stable-baselines/stable_baselines/common/mpi_running_mean_std.py
imports: import mpi4py
  import tensorflow
  import numpy
  import stable_baselines.common.tf_util
label_desc: Use image node_id 1 to create a new RunningMeanStd object from inherited base classes: object with example: obj = RunningMeanStd(epsilon, shape)