import tensorflow as tf

            
            # layers
            l_a = tf.layers.dense(self.state, 200, tf.nn.relu6, kernel_initializer=w_init, name='la')
            self.mu = tf.layers.dense(l_a, num_action, tf.nn.tanh, kernel_initializer=w_init, name='mu') # estimated action value
            self.sigma = tf.layers.dense(l_a, num_action, tf.nn.softplus, kernel_initializer=w_init, name='sigma') # estimated variance
            
            # wrap output
            self.mu = self.mu * action_bound[1];
            self.sigma = self.sigma + 1e-4

            # get action from distribution
            self.normal_dist = tf.contrib.distributions.Normal(self.mu, self.sigma)
            self.action = tf.squeeze(self.normal_dist.sample(1),axis=0);
            self.action = tf.clip_by_value(self.action, action_bound[0], action_bound[1])
            
            # Loss and train op
            self.loss = -self.normal_dist.log_prob(self.a_his) * self.target
            # Add cross entropy cost to encourage exploration
            self.loss -= entropy_beta * self.normal_dist.entropy()
            self.optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate)
            self.grads_and_vars = self.optimizer.compute_gradients(self.loss)
            self.grads=[];
