bb72c5b102a74486036d849b44f80ab3772a18f9,agents/ppo/dppo_worker.py,DPPOWorker,run,#DPPOWorker#,90

Before Change



    def run(self):
        with self.sv.managed_session(self.server.target, config=self.config_proto) as sess, sess.as_default():
            print("DPPO worker {} in managed session".format(self.task_id))
            while not self.sv.should_stop():
                message = None
                while message != "collect":

After Change



    def run(self):
        with tf.Session() as sess, sess.as_default():
            var_receivers = [np.zeros(var.shape.as_list(), dtype=var.dtype.as_numpy_dtype) for var in self.global_vars]
            while True:
                for var_receiver, tf_var in zip(var_receivers, self.global_vars):
                    self.comm.Bcast(var_receiver, root=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: arnomoonens/yarll
Commit Name: bb72c5b102a74486036d849b44f80ab3772a18f9
Time: 2018-02-23
Author: arno.moonens@outlook.com
File Name: agents/ppo/dppo_worker.py
Class Name: DPPOWorker
Method Name: run


Project Name: tensorflow/tpu
Commit Name: d2315580cbe183ca3a6bdb65e455d0493257d223
Time: 2020-04-03
Author: yincui@google.com
File Name: models/official/detection/modeling/architecture/spinenet.py
Class Name:
Method Name: resample_with_alpha


Project Name: deepmind/sonnet
Commit Name: 869b558268f198de90822e4ea17182dc74b78213
Time: 2017-11-09
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: Conv2D
Method Name: _build