class_docstr: Base class for memories organized as a queue / circular buffer.
  
  Args:
      capacity (int > 0): Memory capacity
          (<span style="color:#00C000"><b>default</b></span>: minimum capacity).
      device (string): Device name
          (<span style="color:#00C000"><b>default</b></span>: CPU:0).
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      values_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      min_capacity (int >= 0): <span style="color:#0000C0"><b>internal use</b></span>.
class_docstr_tok: ["Base","class","for","memories","organized","as","a","queue","\/","circular","buffer",".","Args",":","capacity","(","int",">","0",")",":","Memory","capacity","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","minimum","capacity",")",".","device","(","string",")",":","Device","name","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","CPU:0",")",".","name","(","string",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","values_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","min_capacity","(","int",">","=","0",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def __init__(
      self,
      capacity=None,
      *,
      device="CPU",
      name=None,
      values_spec=None,
      min_capacity=None,
  ):
      super().__init__(
          device=device,
          name=name,
          values_spec=values_spec,
          min_capacity=min_capacity,
      )
  
      if capacity is None:
          if self.min_capacity is None:
              raise TensorforceError.required(
                  name="memory",
                  argument="capacity",
                  condition="unknown minimum capacity",
              )
          else:
              self.capacity = self.min_capacity
      elif capacity < self.min_capacity:
          raise TensorforceError.value(
              name="memory",
              argument="capacity",
              value=capacity,
              hint=("< minimum capacity " + str(self.min_capacity)),
          )
      else:
          self.capacity = capacity
  
file_path: tensorforce/tensorforce/core/memories/queue.py
imports: import numpy
  import tensorflow
  from tensorforce import TensorforceError, util
  from tensorforce.core import TensorDict, TensorSpec, tf_function, tf_util, VariableDict
  from tensorforce.core.memories import Memory
label_desc: Use image node_id 1 to create a new Queue object from inherited base classes: Memory with example: obj = Queue(capacity)