d5aba73e0c518742ad38a2482f7a3a567b0e406a,research/a3c_blogpost/a3c_cartpole.py,Worker,run,#Worker#,285

Before Change


      time_count = 0
      done = False
      while not done:
        logits, _ = self.local_model(tf_wrap(current_state[None, :]))
        probs = tf.nn.softmax(logits)

        action = np.random.choice(self.action_size, p=probs.numpy()[0])

After Change


      done = False
      while not done:
        logits, _ = self.local_model(
            tf.convert_to_tensor(current_state[None, :],
                                 dtype=tf.float32))
        probs = tf.nn.softmax(logits)

        action = np.random.choice(self.action_size, p=probs.numpy()[0])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/models
Commit Name: d5aba73e0c518742ad38a2482f7a3a567b0e406a
Time: 2018-07-20
Author: ray.yuan0@gmail.com
File Name: research/a3c_blogpost/a3c_cartpole.py
Class Name: Worker
Method Name: run


Project Name: tensorflow/models
Commit Name: d5aba73e0c518742ad38a2482f7a3a567b0e406a
Time: 2018-07-20
Author: ray.yuan0@gmail.com
File Name: research/a3c_blogpost/a3c_cartpole.py
Class Name: MasterAgent
Method Name: play


Project Name: tensorflow/models
Commit Name: d5aba73e0c518742ad38a2482f7a3a567b0e406a
Time: 2018-07-20
Author: ray.yuan0@gmail.com
File Name: research/a3c_blogpost/a3c_cartpole.py
Class Name: Worker
Method Name: compute_loss