992401f82501726c593ef635b2d124f45ee20707,pyprob/distributions.py,Poisson,log_prob,#Poisson#Any#,568

Before Change


        value = util.to_variable(value)
        value = value.view(self.length_batch, self.length_variates)
        ret = (self._rate.log() * value) - self._rate - (value + 1).lgamma()
        if self.length_batch == 1:
            ret = ret.squeeze(0)
        return ret

    @property
    def mean(self):

After Change


        value = value.view(self.length_batch, self.length_variates)
        print("valuesize", value.size())
        lp = (self._rate.log() * value) - self._rate - (value + 1).lgamma()
        if lp.dim() == 2 and self.length_variates > 1:
            lp = util.safe_torch_sum(lp, dim=1)
        if self.length_batch > 1 and self.length_variates > 1:
            lp = lp.unsqueeze(1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pyprob/pyprob
Commit Name: 992401f82501726c593ef635b2d124f45ee20707
Time: 2018-04-09
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/distributions.py
Class Name: Poisson
Method Name: log_prob


Project Name: cornellius-gp/gpytorch
Commit Name: e9eded7aaff41973112a1e0df7f58b33593784dd
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/likelihoods/noise_models.py
Class Name: _HomoskedasticNoiseBase
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: 8b99e31f40f9bbb77e0e9204227a049d101c25fe
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/likelihoods/noise_models.py
Class Name: _HomoskedasticNoiseBase
Method Name: forward