class_docstr: Abstract base class for TF-Agents replay buffer.
  
  In eager mode, methods modify the buffer or return values directly. In graph
  mode, methods return ops that do so when executed.
class_docstr_tok: ["Abstract","base","class","for","TF-Agents","replay","buffer",".","In","eager","mode",",","methods","modify","the","buffer","or","return","values","directly",".","In","graph","mode",",","methods","return","ops","that","do","so","when","executed","."]
docstr: Initializes the replay buffer.
  
  Args:
    data_spec: A spec or a list/tuple/nest of specs describing a single item
      that can be stored in this buffer
    capacity: number of elements that the replay buffer can hold.
    stateful_dataset: whether the dataset contains stateful ops or not.
docstr_tok: ["Initializes","the","replay","buffer",".","Args",":","data_spec",":","A","spec","or","a","list\/tuple\/nest","of","specs","describing","a","single","item","that","can","be","stored","in","this","buffer","capacity",":","number","of","elements","that","the","replay","buffer","can","hold",".","stateful_dataset",":","whether","the","dataset","contains","stateful","ops","or","not","."]
code: def __init__(self, data_spec, capacity, stateful_dataset=False):
      """Initializes the replay buffer.
  
      Args:
        data_spec: A spec or a list/tuple/nest of specs describing a single item
          that can be stored in this buffer
        capacity: number of elements that the replay buffer can hold.
        stateful_dataset: whether the dataset contains stateful ops or not.
      """
      super(ReplayBuffer, self).__init__()
      common.check_tf1_allowed()
      self._data_spec = data_spec
      self._capacity = capacity
      self._stateful_dataset = stateful_dataset
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import tensorflow
  from tf_agents.utils import common
  from tensorflow.python.data.util import nest
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 1 to create a new ReplayBuffer object from inherited base classes: tf with example: obj = ReplayBuffer(data_spec, capacity, stateful_dataset)