class_docstr: trpo class
class_docstr_tok: ["trpo","class"]
docstr: get action
  :param state: state input
  :param greedy: get action greedy or not
  :return: pi, v, logp_pi, mean, log_std
docstr_tok: ["get","action",":","param","state",":","state","input",":","param","greedy",":","get","action","greedy","or","not",":","return",":","pi",",","v",",","logp_pi",",","mean",",","log_std"]
code: def get_action(self, state, greedy=False):
      """
      get action
      :param state: state input
      :param greedy: get action greedy or not
      :return: pi, v, logp_pi, mean, log_std
      """
      state = np.array([state], np.float32)
      mean = self.actor(state)
      log_std = tf.convert_to_tensor(self.actor.log_std)
      std = tf.exp(log_std)
      std = tf.ones_like(mean) * std
      pi = tfp.distributions.Normal(mean, std)
  
      if greedy:
          action = mean
      else:
          action = pi.sample()
      action = np.clip(action, -self.action_bound, self.action_bound)
      logp_pi = pi.log_prob(action)
  
      value = self.critic(state)
      return action[0], value, logp_pi, mean, log_std
  
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 2 for calling the TRPO obj's underlying member method code with example usage: obj.get_action(state, greedy) and returns: action,  value,  logp_pi,  mean,  log_std