parameters: (self, container_name)
docstring: Returns a context manager that specifies the resource container to use.
  
      Stateful operations, such as variables and queues, can maintain their
      states on devices so that they can be shared by multiple processes.
      A resource container is a string name under which these stateful
      operations are tracked. These resources can be released or cleared
      with `tf.Session.reset()`.
  
      For example:
  
      ```python
      with g.container('experiment0'):
        # All stateful Operations constructed in this context will be placed
        # in resource container "experiment0".
        v1 = tf.Variable([1.0])
        v2 = tf.Variable([2.0])
        with g.container("experiment1"):
          # All stateful Operations constructed in this context will be
          # placed in resource container "experiment1".
          v3 = tf.Variable([3.0])
          q1 = tf.FIFOQueue(10, tf.float32)
        # All stateful Operations constructed in this context will be
        # be created in the "experiment0".
        v4 = tf.Variable([4.0])
        q1 = tf.FIFOQueue(20, tf.float32)
        with g.container(""):
          # All stateful Operations constructed in this context will be
          # be placed in the default resource container.
          v5 = tf.Variable([5.0])
          q3 = tf.FIFOQueue(30, tf.float32)
  
      # Resets container "experiment0", after which the state of v1, v2, v4, q1
      # will become undefined (such as uninitialized).
      tf.Session.reset(target, ["experiment0"])
      ```
  
      Args:
        container_name: container name string.
  
      Returns:
        A context manager for defining resource containers for stateful ops,
          yields the container name.
docstring_summary: Returns a context manager that specifies the resource container to use.
docstring_tokens: Returns a context manager that specifies the resource container to use .
function: def container(self, container_name):
      """Returns a context manager that specifies the resource container to use.
  
      Stateful operations, such as variables and queues, can maintain their
      states on devices so that they can be shared by multiple processes.
      A resource container is a string name under which these stateful
      operations are tracked. These resources can be released or cleared
      with `tf.Session.reset()`.
  
      For example:
  
      ```python
      with g.container('experiment0'):
        # All stateful Operations constructed in this context will be placed
        # in resource container "experiment0".
        v1 = tf.Variable([1.0])
        v2 = tf.Variable([2.0])
        with g.container("experiment1"):
          # All stateful Operations constructed in this context will be
          # placed in resource container "experiment1".
          v3 = tf.Variable([3.0])
          q1 = tf.FIFOQueue(10, tf.float32)
        # All stateful Operations constructed in this context will be
        # be created in the "experiment0".
        v4 = tf.Variable([4.0])
        q1 = tf.FIFOQueue(20, tf.float32)
        with g.container(""):
          # All stateful Operations constructed in this context will be
          # be placed in the default resource container.
          v5 = tf.Variable([5.0])
          q3 = tf.FIFOQueue(30, tf.float32)
  
      # Resets container "experiment0", after which the state of v1, v2, v4, q1
      # will become undefined (such as uninitialized).
      tf.Session.reset(target, ["experiment0"])
      ```
  
      Args:
        container_name: container name string.
  
      Returns:
        A context manager for defining resource containers for stateful ops,
          yields the container name.
      """
      original_container = self._container
      try:
        self._container = container_name
        yield self._container
      finally:
        self._container = original_container
function_tokens: def container ( self , container_name ) : original_container = self . _container try : self . _container = container_name yield self . _container finally : self . _container = original_container