class_docstr: PG class
docstr: choose action with probabilities.
  :param s: state
  :param greedy: choose action greedy or not
  :return: act
docstr_tok: ["choose","action","with","probabilities",".",":","param","s",":","state",":","param","greedy",":","choose","action","greedy","or","not",":","return",":","act"]
code: def get_action(self, s, greedy=False):
      """
      choose action with probabilities.
      :param s: state
      :param greedy: choose action greedy or not
      :return: act
      """
      _logits = self.model(np.array([s], np.float32))
      _probs = tf.nn.softmax(_logits).numpy()
      if greedy:
          return np.argmax(_probs.ravel())
      return tl.rein.choice_action_by_probs(_probs.ravel())
  
file_path: TensorLayer/examples/reinforcement_learning/tutorial_PG.py
imports: import argparse
  import os
  import time
  import gym
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorlayer
label_desc: Use image node_id 2 for calling the PolicyGradient obj's underlying member method code with example usage: obj.get_action(s, greedy) and returns: tl, np