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","."]
code: def __init__(self, obs_dim, act_dim, size, gamma=0.99, lam=0.95):
      self.obs_buf = np.zeros((size, obs_dim), dtype=np.float32)
      self.act_buf = np.zeros((size, act_dim), dtype=np.float32)
      self.adv_buf = np.zeros(size, dtype=np.float32)
      self.rew_buf = np.zeros(size, dtype=np.float32)
      self.ret_buf = np.zeros(size, dtype=np.float32)
      self.val_buf = np.zeros(size, dtype=np.float32)
      self.logp_buf = np.zeros(size, dtype=np.float32)
      self.mean_buf = np.zeros(size, dtype=np.float32)
      self.log_std_buf = np.zeros(size, dtype=np.float32)
      self.gamma, self.lam = gamma, lam
      self.ptr, self.path_start_idx, self.max_size = 0, 0, size
  
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 1 to create a new GAE_Buffer object  with example: obj = GAE_Buffer(obs_dim, act_dim, size, gamma, lam)