class_docstr: trpo class
class_docstr_tok: ["trpo","class"]
code: def __init__(self, state_dim, action_dim, action_bound):
      # critic
      with tf.name_scope("critic"):
          layer = input_layer = tl.layers.Input(
              [None, state_dim], tf.float32
          )
          for d in HIDDEN_SIZES:
              layer = tl.layers.Dense(d, tf.nn.relu)(layer)
          v = tl.layers.Dense(1)(layer)
      self.critic = tl.models.Model(input_layer, v)
      self.critic.train()
  
      # actor
      with tf.name_scope("actor"):
          layer = input_layer = tl.layers.Input(
              [None, state_dim], tf.float32
          )
          for d in HIDDEN_SIZES:
              layer = tl.layers.Dense(d, tf.nn.relu)(layer)
          mean = tl.layers.Dense(action_dim, tf.nn.tanh)(layer)
          mean = tl.layers.Lambda(lambda x: x * action_bound)(mean)
          log_std = tf.Variable(np.zeros(action_dim, dtype=np.float32))
  
      self.actor = tl.models.Model(input_layer, mean)
      self.actor.trainable_weights.append(log_std)
      self.actor.log_std = log_std
      self.actor.train()
  
      self.buf = GAE_Buffer(
          state_dim, action_dim, BATCH_SIZE, GAMMA, LAM
      )
      self.critic_optimizer = tf.optimizers.Adam(learning_rate=VF_LR)
      self.action_bound = action_bound
  
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 TRPO object  with example: obj = TRPO(state_dim, action_dim, action_bound)