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: Returns an item or batch of items from the buffer.
  
  Args:
    sample_batch_size: (Optional.) An optional batch_size to specify the
      number of items to return. If None (default), a single item is returned
      which matches the data_spec of this class (without a batch dimension).
      Otherwise, a batch of sample_batch_size items is returned, where each
      tensor in items will have its first dimension equal to sample_batch_size
      and the rest of the dimensions match the corresponding data_spec. See
      examples below.
    num_steps: (Optional.)  Optional way to specify that sub-episodes are
      desired. If None (default), in non-episodic replay buffers, a batch of
      single items is returned. In episodic buffers, full episodes are
      returned (note that sample_batch_size must be None in that case).
      Otherwise, a batch of sub-episodes is returned, where a sub-episode is a
      sequence of consecutive items in the replay_buffer. The returned tensors
      will have first dimension equal to sample_batch_size (if
      sample_batch_size is not None), subsequent dimension equal to num_steps,
      if time_stacked=True and remaining dimensions which match the data_spec
      of this class. See examples below.
    time_stacked: (Optional.) Boolean, when true and num_steps > 1 it returns
      the items stacked on the time dimension. See examples below for details.
      Examples of tensor shapes returned: (B = batch size, T = timestep, D =
      data spec)  get_next(sample_batch_size=None, num_steps=None,
      time_stacked=True) return shape (non-episodic): [D] return shape
      (episodic): [T, D] (T = full length of the episode)
      get_next(sample_batch_size=B, num_steps=None, time_stacked=True) return
      shape (non-episodic): [B, D] return shape (episodic): Not supported
        get_next(sample_batch_size=B, num_steps=T, time_stacked=True) return
      shape: [B, T, D] get_next(sample_batch_size=None, num_steps=T,
        time_stacked=False) return shape: ([D], [D], ..) T tensors in the
        tuple get_next(sample_batch_size=B, num_steps=T, time_stacked=False)
        return
      shape: ([B, D], [B, D], ..) T tensors in the tuple
  
  Returns:
    A 2-tuple containing:
      - An item or sequence of (optionally batched and stacked) items.
      - Auxiliary info for the items (i.e. ids, probs).
docstr_tok: ["Returns","an","item","or","batch","of","items","from","the","buffer",".","Args",":","sample_batch_size",":","(","Optional",".",")","An","optional","batch_size","to","specify","the","number","of","items","to","return",".","If","None","(","default",")",",","a","single","item","is","returned","which","matches","the","data_spec","of","this","class","(","without","a","batch","dimension",")",".","Otherwise",",","a","batch","of","sample_batch_size","items","is","returned",",","where","each","tensor","in","items","will","have","its","first","dimension","equal","to","sample_batch_size","and","the","rest","of","the","dimensions","match","the","corresponding","data_spec",".","See","examples","below",".","num_steps",":","(","Optional",".",")","Optional","way","to","specify","that","sub-episodes","are","desired",".","If","None","(","default",")",",","in","non-episodic","replay","buffers",",","a","batch","of","single","items","is","returned",".","In","episodic","buffers",",","full","episodes","are","returned","(","note","that","sample_batch_size","must","be","None","in","that","case",")",".","Otherwise",",","a","batch","of","sub-episodes","is","returned",",","where","a","sub-episode","is","a","sequence","of","consecutive","items","in","the","replay_buffer",".","The","returned","tensors","will","have","first","dimension","equal","to","sample_batch_size","(","if","sample_batch_size","is","not","None",")",",","subsequent","dimension","equal","to","num_steps",",","if","time_stacked=True","and","remaining","dimensions","which","match","the","data_spec","of","this","class",".","See","examples","below",".","time_stacked",":","(","Optional",".",")","Boolean",",","when","true","and","num_steps",">","1","it","returns","the","items","stacked","on","the","time","dimension",".","See","examples","below","for","details",".","Examples","of","tensor","shapes","returned",":","(","B","=","batch","size",",","T","=","timestep",",","D","=","data","spec",")","get_next","(","sample_batch_size=None",",","num_steps=None",",","time_stacked=True",")","return","shape","(","non-episodic",")",":","[","D","]","return","shape","(","episodic",")",":","[","T",",","D","]","(","T","=","full","length","of","the","episode",")","get_next","(","sample_batch_size=B",",","num_steps=None",",","time_stacked=True",")","return","shape","(","non-episodic",")",":","[","B",",","D","]","return","shape","(","episodic",")",":","Not","supported","get_next","(","sample_batch_size=B",",","num_steps=T",",","time_stacked=True",")","return","shape",":","[","B",",","T",",","D","]","get_next","(","sample_batch_size=None",",","num_steps=T",",","time_stacked=False",")","return","shape",":","(","[","D","]",",","[","D","]",",","..",")","T","tensors","in","the","tuple","get_next","(","sample_batch_size=B",",","num_steps=T",",","time_stacked=False",")","return","shape",":","(","[","B",",","D","]",",","[","B",",","D","]",",","..",")","T","tensors","in","the","tuple","Returns",":","A","2-tuple","containing",":","-","An","item","or","sequence","of","(","optionally","batched","and","stacked",")","items",".","-","Auxiliary","info","for","the","items","(","i.e",".","ids",",","probs",")","."]
code: def get_next(
      self, sample_batch_size=None, num_steps=None, time_stacked=True
  ):
      """Returns an item or batch of items from the buffer.
  
      Args:
        sample_batch_size: (Optional.) An optional batch_size to specify the
          number of items to return. If None (default), a single item is returned
          which matches the data_spec of this class (without a batch dimension).
          Otherwise, a batch of sample_batch_size items is returned, where each
          tensor in items will have its first dimension equal to sample_batch_size
          and the rest of the dimensions match the corresponding data_spec. See
          examples below.
        num_steps: (Optional.)  Optional way to specify that sub-episodes are
          desired. If None (default), in non-episodic replay buffers, a batch of
          single items is returned. In episodic buffers, full episodes are
          returned (note that sample_batch_size must be None in that case).
          Otherwise, a batch of sub-episodes is returned, where a sub-episode is a
          sequence of consecutive items in the replay_buffer. The returned tensors
          will have first dimension equal to sample_batch_size (if
          sample_batch_size is not None), subsequent dimension equal to num_steps,
          if time_stacked=True and remaining dimensions which match the data_spec
          of this class. See examples below.
        time_stacked: (Optional.) Boolean, when true and num_steps > 1 it returns
          the items stacked on the time dimension. See examples below for details.
          Examples of tensor shapes returned: (B = batch size, T = timestep, D =
          data spec)  get_next(sample_batch_size=None, num_steps=None,
          time_stacked=True) return shape (non-episodic): [D] return shape
          (episodic): [T, D] (T = full length of the episode)
          get_next(sample_batch_size=B, num_steps=None, time_stacked=True) return
          shape (non-episodic): [B, D] return shape (episodic): Not supported
            get_next(sample_batch_size=B, num_steps=T, time_stacked=True) return
          shape: [B, T, D] get_next(sample_batch_size=None, num_steps=T,
            time_stacked=False) return shape: ([D], [D], ..) T tensors in the
            tuple get_next(sample_batch_size=B, num_steps=T, time_stacked=False)
            return
          shape: ([B, D], [B, D], ..) T tensors in the tuple
  
      Returns:
        A 2-tuple containing:
          - An item or sequence of (optionally batched and stacked) items.
          - Auxiliary info for the items (i.e. ids, probs).
      """
      return self._get_next(sample_batch_size, num_steps, time_stacked)
  
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 7 for calling the ReplayBuffer obj's underlying member method code with example usage: obj.get_next(sample_batch_size, num_steps, time_stacked) and returns: self