class_docstr: A buffer for storing trajectories experienced by a TRPO agent interacting
  with the environment, and using Generalized Advantage Estimation (GAE-lambda)
  for calculating the advantages of state-action pairs.
class_docstr_tok: ["A","buffer","for","storing","trajectories","experienced","by","a","TRPO","agent","interacting","with","the","environment",",","and","using","Generalized","Advantage","Estimation","(","GAE-lambda",")","for","calculating","the","advantages","of","state-action","pairs","."]
docstr: Call this at the end of an epoch to get all of the data from
  the buffer, with advantages appropriately normalized (shifted to have
  mean zero and std one). Also, resets some pointers in the buffer.
docstr_tok: ["Call","this","at","the","end","of","an","epoch","to","get","all","of","the","data","from","the","buffer",",","with","advantages","appropriately","normalized","(","shifted","to","have","mean","zero","and","std","one",")",".","Also",",","resets","some","pointers","in","the","buffer","."]
code: def get(self):
      """
      Call this at the end of an epoch to get all of the data from
      the buffer, with advantages appropriately normalized (shifted to have
      mean zero and std one). Also, resets some pointers in the buffer.
      """
      assert (
          self.ptr == self.max_size
      )  # buffer has to be full before you can get
      self.ptr, self.path_start_idx = 0, 0
  
      # the next two lines implement the advantage normalization trick
      adv_mean, adv_std = np.mean(self.adv_buf), np.std(self.adv_buf)
      self.adv_buf = (self.adv_buf - adv_mean) / adv_std
      return [
          self.obs_buf,
          self.act_buf,
          self.adv_buf,
          self.ret_buf,
          self.logp_buf,
          self.mean_buf,
          self.log_std_buf,
      ]
  
imports: import argparse
  import copy
  import os
  import threading
  import time
  import gym
  import matplotlib.pyplot
  import numpy
  import scipy.signal
  import tensorflow
  import tensorflow_probability
  import tensorlayer
label_desc: Use image node_id 6 for calling the GAE_Buffer obj's underlying member method code with example usage: obj.get() and returns: list