class_docstr: A TFUniformReplayBuffer with batched adds and uniform sampling.
class_docstr_tok: ["A","TFUniformReplayBuffer","with","batched","adds","and","uniform","sampling","."]
docstr: Adds a batch of items to the replay buffer.
  
  Args:
    items: A tensor or list/tuple/nest of tensors representing a batch of
      items to be added to the replay buffer. Each element of `items` must
      match the data_spec of this class. Should be shape [batch_size,
      data_spec, ...]
  
  Returns:
    An op that adds `items` to the replay buffer.
  Raises:
    ValueError: If called more than once.
docstr_tok: ["Adds","a","batch","of","items","to","the","replay","buffer",".","Args",":","items",":","A","tensor","or","list\/tuple\/nest","of","tensors","representing","a","batch","of","items","to","be","added","to","the","replay","buffer",".","Each","element","of","`","items","`","must","match","the","data_spec","of","this","class",".","Should","be","shape","[","batch_size",",","data_spec",",","...","]","Returns",":","An","op","that","adds","`","items","`","to","the","replay","buffer",".","Raises",":","ValueError",":","If","called","more","than","once","."]
code: def _add_batch(self, items):
      """Adds a batch of items to the replay buffer.
  
      Args:
        items: A tensor or list/tuple/nest of tensors representing a batch of
          items to be added to the replay buffer. Each element of `items` must
          match the data_spec of this class. Should be shape [batch_size,
          data_spec, ...]
  
      Returns:
        An op that adds `items` to the replay buffer.
      Raises:
        ValueError: If called more than once.
      """
      nest_utils.assert_same_structure(items, self._data_spec)
      # Calling get_outer_rank here will validate that all items have the same
      # outer rank. This was not usually an issue, but now that it's easier to
      # call this from an eager context it's easy to make the mistake.
      nest_utils.get_outer_rank(
          tf.nest.map_structure(tf.convert_to_tensor, items),
          self._data_spec,
      )
  
      with tf.device(self._device), tf.name_scope(self._scope):
          id_ = self._increment_last_id()
          write_rows = self._get_rows_for_id(id_)
          write_id_op = self._id_table.write(write_rows, id_)
          write_data_op = self._data_table.write(write_rows, items)
          return tf.group(write_id_op, write_data_op)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import gin
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import replay_buffer
  from tf_agents.replay_buffers import table
  from tf_agents.specs import tensor_spec
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 7 for calling the TFUniformReplayBuffer obj's underlying member method code with example usage: obj._add_batch(items) and returns: tf