class_docstr: An out-of-graph Replay Buffer for Prioritized Experience Replay.
  
  See circular_replay_buffer.py for details.
class_docstr_tok: ["An","out-of-graph","Replay","Buffer","for","Prioritized","Experience","Replay",".","See","circular_replay_buffer.py","for","details","."]
docstr: Initializes OutOfGraphPrioritizedReplayBuffer.
  
  Args:
    observation_shape: tuple of ints.
    stack_size: int, number of frames to use in state stack.
    replay_capacity: int, number of transitions to keep in memory.
    batch_size: int.
    update_horizon: int, length of update ('n' in n-step update).
    gamma: float, the discount factor.
    max_sample_attempts: int, the maximum number of attempts allowed to
      get a sample.
    extra_storage_types: list of ReplayElements defining the type of the extra
      contents that will be stored and returned by sample_transition_batch.
    observation_dtype: np.dtype, type of the observations. Defaults to
      np.uint8 for Atari 2600.
    terminal_dtype: np.dtype, type of the terminals. Defaults to np.uint8 for
      Atari 2600.
    action_shape: tuple of ints, the shape for the action vector. Empty tuple
      means the action is a scalar.
    action_dtype: np.dtype, type of elements in the action.
    reward_shape: tuple of ints, the shape of the reward vector. Empty tuple
      means the reward is a scalar.
    reward_dtype: np.dtype, type of elements in the reward.
docstr_tok: ["Initializes","OutOfGraphPrioritizedReplayBuffer",".","Args",":","observation_shape",":","tuple","of","ints",".","stack_size",":","int",",","number","of","frames","to","use","in","state","stack",".","replay_capacity",":","int",",","number","of","transitions","to","keep","in","memory",".","batch_size",":","int",".","update_horizon",":","int",",","length","of","update","(","'n","'","in","n-step","update",")",".","gamma",":","float",",","the","discount","factor",".","max_sample_attempts",":","int",",","the","maximum","number","of","attempts","allowed","to","get","a","sample",".","extra_storage_types",":","list","of","ReplayElements","defining","the","type","of","the","extra","contents","that","will","be","stored","and","returned","by","sample_transition_batch",".","observation_dtype",":","np.dtype",",","type","of","the","observations",".","Defaults","to","np.uint8","for","Atari","2600.","terminal_dtype",":","np.dtype",",","type","of","the","terminals",".","Defaults","to","np.uint8","for","Atari","2600.","action_shape",":","tuple","of","ints",",","the","shape","for","the","action","vector",".","Empty","tuple","means","the","action","is","a","scalar",".","action_dtype",":","np.dtype",",","type","of","elements","in","the","action",".","reward_shape",":","tuple","of","ints",",","the","shape","of","the","reward","vector",".","Empty","tuple","means","the","reward","is","a","scalar",".","reward_dtype",":","np.dtype",",","type","of","elements","in","the","reward","."]
code: def __init__(
      self,
      observation_shape,
      stack_size,
      replay_capacity,
      batch_size,
      update_horizon=1,
      gamma=0.99,
      max_sample_attempts=1000,
      extra_storage_types=None,
      observation_dtype=np.uint8,
      terminal_dtype=np.uint8,
      action_shape=(),
      action_dtype=np.int32,
      reward_shape=(),
      reward_dtype=np.float32,
  ):
      """Initializes OutOfGraphPrioritizedReplayBuffer.
  
      Args:
        observation_shape: tuple of ints.
        stack_size: int, number of frames to use in state stack.
        replay_capacity: int, number of transitions to keep in memory.
        batch_size: int.
        update_horizon: int, length of update ('n' in n-step update).
        gamma: float, the discount factor.
        max_sample_attempts: int, the maximum number of attempts allowed to
          get a sample.
        extra_storage_types: list of ReplayElements defining the type of the extra
          contents that will be stored and returned by sample_transition_batch.
        observation_dtype: np.dtype, type of the observations. Defaults to
          np.uint8 for Atari 2600.
        terminal_dtype: np.dtype, type of the terminals. Defaults to np.uint8 for
          Atari 2600.
        action_shape: tuple of ints, the shape for the action vector. Empty tuple
          means the action is a scalar.
        action_dtype: np.dtype, type of elements in the action.
        reward_shape: tuple of ints, the shape of the reward vector. Empty tuple
          means the reward is a scalar.
        reward_dtype: np.dtype, type of elements in the reward.
      """
      super(OutOfGraphPrioritizedReplayBuffer, self).__init__(
          observation_shape=observation_shape,
          stack_size=stack_size,
          replay_capacity=replay_capacity,
          batch_size=batch_size,
          update_horizon=update_horizon,
          gamma=gamma,
          max_sample_attempts=max_sample_attempts,
          extra_storage_types=extra_storage_types,
          observation_dtype=observation_dtype,
          terminal_dtype=terminal_dtype,
          action_shape=action_shape,
          action_dtype=action_dtype,
          reward_shape=reward_shape,
          reward_dtype=reward_dtype,
      )
  
      self.sum_tree = sum_tree.SumTree(replay_capacity)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from dopamine.replay_memory import circular_replay_buffer
  from dopamine.replay_memory import sum_tree
  from dopamine.replay_memory.circular_replay_buffer import ReplayElement
  import gin.tf
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new OutOfGraphPrioritizedReplayBuffer object from inherited base classes: circular_replay_buffer with example: obj = OutOfGraphPrioritizedReplayBuffer(observation_shape, stack_size, replay_capacity, batch_size, update_horizon, gamma, max_sample_attempts, extra_storage_types, observation_dtype, terminal_dtype, action_shape, action_dtype, reward_shape, reward_dtype)