class_docstr: Normalizes mean & variance based on full history of tensor values.
docstr: Returns a list of ops which update normalizer variables for tensor.
  
  Args:
    tensors: The tensors of values to be normalized.
    outer_dims: Ignored.  The batch dimensions are extracted by comparing the
      associated tensor with the specs.
  
  Returns:
    A list of ops, which when run will update all necessary normaliztion
    variables.
docstr_tok: ["Returns","a","list","of","ops","which","update","normalizer","variables","for","tensor",".","Args",":","tensors",":","The","tensors","of","values","to","be","normalized",".","outer_dims",":","Ignored",".","The","batch","dimensions","are","extracted","by","comparing","the","associated","tensor","with","the","specs",".","Returns",":","A","list","of","ops",",","which","when","run","will","update","all","necessary","normaliztion","variables","."]
code: def _update_ops(self, tensors, outer_dims):
      """Returns a list of ops which update normalizer variables for tensor.
  
      Args:
        tensors: The tensors of values to be normalized.
        outer_dims: Ignored.  The batch dimensions are extracted by comparing the
          associated tensor with the specs.
  
      Returns:
        A list of ops, which when run will update all necessary normaliztion
        variables.
      """
      del outer_dims
  
      outer_shape = nest_utils.get_outer_shape(
          tensors, self._tensor_spec
      )
      outer_rank_static = tf.compat.dimension_value(
          outer_shape.shape[0]
      )
      outer_axes = (
          list(range(outer_rank_static))
          if outer_rank_static is not None
          else tf.range(tf.size(outer_shape))
      )
  
      outer_n = tf.reduce_prod(outer_shape)
  
      flat_tensors = tf.nest.flatten(tensors)
  
      update_ops = []
  
      for i, t in enumerate(flat_tensors):
          n_a = tf.cast(outer_n, self._count[i].dtype)
          avg_a = tf.math.reduce_mean(t, outer_axes)
          m2_a = tf.math.reduce_sum(
              tf.math.squared_difference(t, avg_a), outer_axes
          )
          n_b = self._count[i]
          avg_b = self._avg[i]
          m2_b = self._m2[i]
          m2_b_c = self._m2_carry[i]
  
          n_ab, avg_ab, m2_ab, m2_ab_c = parallel_variance_calculation(
              n_a, avg_a, m2_a, n_b, avg_b, m2_b, m2_b_c
          )
          with tf.control_dependencies([n_ab, avg_ab, m2_ab, m2_ab_c]):
              update_ops.extend(
                  [
                      self._count[i].assign(n_ab),
                      self._avg[i].assign(avg_ab),
                      self._m2[i].assign(m2_ab),
                      self._m2_carry[i].assign(m2_ab_c),
                  ]
              )
  
      return update_ops
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Tuple
  import six
  import tensorflow
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 3 for calling the StreamingTensorNormalizer obj's underlying member method code with example usage: obj._update_ops(tensors, outer_dims) and returns: update_ops