a6652b0c1997bb47dd502bf674e0b3b9b2d09d23,examples/reinforcement_learning/tutorial_bipedalwalker_a3c_continuous_action.py,ACNet,choose_action,#ACNet#Any#,162

Before Change



    def choose_action(self, s):  // run by a local
        s = s[np.newaxis, :]
        return sess.run(self.A, {self.s: s})[0]

    def save_ckpt(self):
        tl.files.exists_or_mkdir(self.scope)

After Change


        s = s[np.newaxis, :]
        self.mu, self.sigma = self.actor(s)

        with tf.name_scope("wrap_a_out"):
            self.mu, self.sigma = self.mu * A_BOUND[1], self.sigma + 1e-5
        normal_dist = tfd.Normal(self.mu, self.sigma)   // for continuous action space
        self.A = tf.clip_by_value(tf.squeeze(normal_dist.sample(1), axis=0), *A_BOUND)
        return self.A.numpy()[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: a6652b0c1997bb47dd502bf674e0b3b9b2d09d23
Time: 2019-05-16
Author: 1402434478@qq.com
File Name: examples/reinforcement_learning/tutorial_bipedalwalker_a3c_continuous_action.py
Class Name: ACNet
Method Name: choose_action


Project Name: tensorlayer/tensorlayer
Commit Name: 6ca2a6359dc1374bfb211da8680f3d5f319cdaa5
Time: 2019-05-16
Author: 1402434478@qq.com
File Name: examples/reinforcement_learning/tutorial_bipedalwalker_a3c_continuous_action.py
Class Name: ACNet
Method Name: choose_action


Project Name: tensorflow/transform
Commit Name: 76bfb4027c2a04d1d65dbfc3befdc2805133c957
Time: 2017-05-16
Author: no-reply@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: uniques