0e6f7cea4abae753c8e496bbbe6465af6818ad92,tensorforce/models/distribution_model.py,DistributionModel,tf_regularization_losses,#DistributionModel#Any#Any#,149

Before Change


            losses["network"] = network_loss

        if any(distribution.regularization_loss() is not None for distribution in self.distributions.values()):
            losses["distributions"] = tf.add_n(inputs=[
                distribution.regularization_loss() for distribution in self.distributions.values()
                if distribution.regularization_loss() is not None
            ])

        if self.entropy_regularization is not None and self.entropy_regularization > 0.0:
            entropies = list()
            embedding = self.network.apply(x=states, internals=internals)

After Change


                if "distributions" in losses:
                    losses["distributions"] += regularization_loss
                else:
                    losses["distributions"] = regularization_loss

        if self.entropy_regularization is not None and self.entropy_regularization > 0.0:
            entropies = list()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: reinforceio/tensorforce
Commit Name: 0e6f7cea4abae753c8e496bbbe6465af6818ad92
Time: 2017-10-28
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/distribution_model.py
Class Name: DistributionModel
Method Name: tf_regularization_losses


Project Name: reinforceio/tensorforce
Commit Name: 7deceb39597ea90e0f130448cf3616f0875b7f91
Time: 2017-10-28
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/q_naf_model.py
Class Name: QNAFModel
Method Name: tf_regularization_losses


Project Name: NifTK/NiftyNet
Commit Name: 135a56e0935fbb04811f8ce7b9f514f498212f71
Time: 2018-07-25
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: ftheta