code: def __init__(self, scope):
      self.scope = scope
  
      w_init = tf.keras.initializers.glorot_normal(
          seed=None
      )  # initializer, glorot=xavier
  
      def get_actor(input_shape):  # policy network
          with tf.name_scope(self.scope):
              ni = tl.layers.Input(input_shape, name="in")
              nn = tl.layers.Dense(
                  n_units=500, act=tf.nn.relu6, W_init=w_init, name="la"
              )(ni)
              nn = tl.layers.Dense(
                  n_units=300,
                  act=tf.nn.relu6,
                  W_init=w_init,
                  name="la2",
              )(nn)
              mu = tl.layers.Dense(
                  n_units=N_A, act=tf.nn.tanh, W_init=w_init, name="mu"
              )(nn)
              sigma = tl.layers.Dense(
                  n_units=N_A,
                  act=tf.nn.softplus,
                  W_init=w_init,
                  name="sigma",
              )(nn)
          return tl.models.Model(
              inputs=ni, outputs=[mu, sigma], name=scope + "/Actor"
          )
  
      self.actor = get_actor([None, N_S])
      self.actor.train()  # train mode for Dropout, BatchNorm
  
      def get_critic(
          input_shape,
      ):  # we use Value-function here, but not Q-function.
          with tf.name_scope(self.scope):
              ni = tl.layers.Input(input_shape, name="in")
              nn = tl.layers.Dense(
                  n_units=500, act=tf.nn.relu6, W_init=w_init, name="lc"
              )(ni)
              nn = tl.layers.Dense(
                  n_units=300,
                  act=tf.nn.relu6,
                  W_init=w_init,
                  name="lc2",
              )(nn)
              v = tl.layers.Dense(n_units=1, W_init=w_init, name="v")(
                  nn
              )
          return tl.models.Model(
              inputs=ni, outputs=v, name=scope + "/Critic"
          )
  
      self.critic = get_critic([None, N_S])
      self.critic.train()
  
imports: import argparse
  import multiprocessing
  import os
  import threading
  import time
  import gym
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorflow_probability
  import tensorlayer
label_desc: Use image node_id 1 to create a new ACNet object from inherited base classes: object with example: obj = ACNet(scope)