46cb2800632916cd005a974f72c648a4524c08c2,pixyz/losses/mmd.py,MMD,_get_estimated_value,#MMD#Any#,47

Before Change


        return "MMD[{}||{}]".format(self._p.prob_text, self._q.prob_text)

    def _get_estimated_value(self, x={}, **kwargs):
        batch_size = get_dict_values(x, self.input_dist.input_var[0])[0].shape[0]

        // sample from distributions
        p_x = get_dict_values(self._p.sample(x, batch_size=batch_size), self._p.var)[0]
        q_x = get_dict_values(self._q.sample(x, batch_size=batch_size), self._q.var)[0]

After Change


        return get_dict_values(x, self.input_dist.input_var[0])[0].shape[0]

    def _get_estimated_value(self, x={}, **kwargs):
        batch_size = self._get_batch_size(x)

        // sample from distributions
        p_x = get_dict_values(self._p.sample(x, batch_size=batch_size), self._p.var)[0]
        q_x = get_dict_values(self._q.sample(x, batch_size=batch_size), self._q.var)[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: masa-su/pixyz
Commit Name: 46cb2800632916cd005a974f72c648a4524c08c2
Time: 2019-03-18
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/losses/mmd.py
Class Name: MMD
Method Name: _get_estimated_value


Project Name: masa-su/pixyz
Commit Name: 45770920b92d81ab27e03a3305fe8e776427d111
Time: 2019-03-14
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/losses/adversarial_loss.py
Class Name: AdversarialJensenShannon
Method Name: _get_estimated_value


Project Name: masa-su/pixyz
Commit Name: 45770920b92d81ab27e03a3305fe8e776427d111
Time: 2019-03-14
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/losses/adversarial_loss.py
Class Name: AdversarialKullbackLeibler
Method Name: _get_estimated_value