b0fd7d13ff1392c60dfef432bfea7a7dd035f71f,tensorforce/models/vpg_model.py,VPGModel,create_tf_operations,#VPGModel#Any#,39

Before Change


                log_prob = self.distribution[name].log_probability(action=action)
                lps_list = [log_prob]
                for _ in range(len(config.actions[name].shape)):
                    lps_list = [lp for lps in lps_list for lp in tf.unstack(value=lps, axis=1)]
                log_probs.extend(lps_list)

            log_prob = tf.add_n(inputs=log_probs) / len(log_probs)
            self.loss_per_instance = -log_prob * self.reward

After Change


            log_probs = list()
            for name, action in self.action.items():
                log_prob = self.distribution[name].log_probability(action=action)
                log_prob = tf.reshape(tensor=log_prob, shape=(-1, util.prod(config.actions[name].shape)))
                log_probs.append(log_prob)

            log_prob = tf.reduce_mean(input_tensor=tf.concat(values=log_probs, axis=1), axis=1)
            self.loss_per_instance = -log_prob * self.reward
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: reinforceio/tensorforce
Commit Name: b0fd7d13ff1392c60dfef432bfea7a7dd035f71f
Time: 2017-07-29
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/vpg_model.py
Class Name: VPGModel
Method Name: create_tf_operations


Project Name: tensorflow/models
Commit Name: f7b4c6de2037ebedf6bc8ea5979e81666d54534f
Time: 2020-12-01
Author: rathodv@google.com
File Name: research/object_detection/meta_architectures/center_net_meta_arch.py
Class Name:
Method Name: convert_strided_predictions_to_normalized_boxes


Project Name: reinforceio/tensorforce
Commit Name: b0fd7d13ff1392c60dfef432bfea7a7dd035f71f
Time: 2017-07-29
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/dqfd_model.py
Class Name: DQFDModel
Method Name: create_tf_operations