import tensorflow as tf

    # AC net
    def build_anet(self, state_in, name, reuse=False, batch_size=64):
        reg = None
        with tf.variable_scope(name, reuse=reuse):
            layer_a1 = tf.layers.dense(state_in, 512, tf.nn.relu, kernel_regularizer=reg)
            layer_a2 = tf.layers.dense(layer_a1, 256, tf.nn.relu, kernel_regularizer=reg)
            lstm_a = tf.nn.rnn_cell.LSTMCell(num_units=256)
            lstm_a = tf.nn.rnn_cell.DropoutWrapper(lstm_a, output_keep_prob=self.keep_prob)
            state_init_a = lstm_a.zero_state(batch_size=batch_size, dtype=tf.float32)
            lstm_ain = tf.expand_dims(layer_a2, axis=1)
            out_a, state_final_a = tf.nn.dynamic_rnn(cell=lstm_a, inputs=lstm_ain, initial_state=state_init_a)
            cell_out_a = tf.reshape(out_a, [-1, 256])
            mu = tf.layers.dense(cell_out_a, self.a_dim, tf.nn.tanh, kernel_regularizer=reg)
            sigma = tf.layers.dense(cell_out_a, self.a_dim, tf.nn.softplus, kernel_regularizer=reg)
