class_docstr: Class for composing individual encoding stages.
  
  This class provides functionality for arbitrarily composing individual
  encoding stages (implementations of `EncodingStageInterface` or
  `AdaptiveEncodingStageInterface`) into a tree, where an output `Tensor` of an
  encoding stage can be further encoded by another encoding stage.
  
  The interface is similar to that of `AdaptiveEncodingStageInterface`, with the
  additional methods `decode_before_sum` and `decode_after_sum`. These methods
  split the decoding functionality to two parts, based on commutativity with
  summation.
  
  Similar to the `AdaptiveEncodingStageInterface`, the methods are designed to
  be functional transformations. That means, for instance, that the
  `initial_state` and `update_state` methods do not modify any underlying state.
  Rather, the user of the `Encoder` class is responsible for storing any values
  if necessary, and providing them back to appropriate methods of this class.
docstr: Updates the state of the Encoder.
  
  Args:
    state: A dictionary of the same structure as returned by the
      `initial_state` method, representing the current state.
    state_update_tensors: A dictionary of the same structure as returned by
      the `encode` method, representing the tensors needed for updating the
      state. The values are possibly aggregated across multiple realizations
      of the encoding.
    name: `string`, name of the operation.
  
  Returns:
    A dictionary with two keys: `EncoderKeys.STATE` and
    `EncoderKeys.CHILDREN`. The `EncoderKeys.STATE` key maps to a dictionary
    containing the initial state of the encoding stage controlled by this
    class. The `EncoderKeys.CHILDREN` key maps to a dictionary with the same
    keys as `self.children`, each of which maps to an object like this one,
    recursively.
docstr_tok: ["Updates","the","state","of","the","Encoder",".","Args",":","state",":","A","dictionary","of","the","same","structure","as","returned","by","the","`","initial_state","`","method",",","representing","the","current","state",".","state_update_tensors",":","A","dictionary","of","the","same","structure","as","returned","by","the","`","encode","`","method",",","representing","the","tensors","needed","for","updating","the","state",".","The","values","are","possibly","aggregated","across","multiple","realizations","of","the","encoding",".","name",":","`","string","`",",","name","of","the","operation",".","Returns",":","A","dictionary","with","two","keys",":","`","EncoderKeys.STATE","`","and","`","EncoderKeys.CHILDREN","`",".","The","`","EncoderKeys.STATE","`","key","maps","to","a","dictionary","containing","the","initial","state","of","the","encoding","stage","controlled","by","this","class",".","The","`","EncoderKeys.CHILDREN","`","key","maps","to","a","dictionary","with","the","same","keys","as","`","self.children","`",",","each","of","which","maps","to","an","object","like","this","one",",","recursively","."]
code: def update_state(self, state, state_update_tensors, name=None):
      """Updates the state of the Encoder.
  
      Args:
        state: A dictionary of the same structure as returned by the
          `initial_state` method, representing the current state.
        state_update_tensors: A dictionary of the same structure as returned by
          the `encode` method, representing the tensors needed for updating the
          state. The values are possibly aggregated across multiple realizations
          of the encoding.
        name: `string`, name of the operation.
  
      Returns:
        A dictionary with two keys: `EncoderKeys.STATE` and
        `EncoderKeys.CHILDREN`. The `EncoderKeys.STATE` key maps to a dictionary
        containing the initial state of the encoding stage controlled by this
        class. The `EncoderKeys.CHILDREN` key maps to a dictionary with the same
        keys as `self.children`, each of which maps to an object like this one,
        recursively.
      """
      values = tf.nest.flatten(state) + tf.nest.flatten(
          state_update_tensors
      )
      with tf.compat.v1.name_scope(
          name, "encoder_update_state", values
      ):
          return self._update_state_impl(state, state_update_tensors)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 8 for calling the Encoder obj's underlying member method code with example usage: obj.update_state(state, state_update_tensors, name) and returns: self