f3ed294875549679cb8d365e6604a4d4545de31b,gpytorch/mlls/variational_elbo.py,VariationalELBO,forward,#VariationalELBO#Any#Any#,26

Before Change


            return res
        else:
            log_prior = torch.zeros_like(log_likelihood)
            for _, param, prior in self.named_parameter_priors():
                log_prior.add_(prior.log_prob(param).sum())
            for _, params, transform, prior in self.named_derived_priors():
                log_prior.add_(prior.log_prob(transform(*params)).sum())
            return log_likelihood, kl_divergence, log_prior.div(self.num_data)

After Change


        if self.combine_terms:
            res = log_likelihood - kl_divergence
            for _, prior, params, tf in self.named_priors():
                lp_arg = params[0] if tf is None else tf(*params)
                res.add_(prior.log_prob(lp_arg).sum().div(self.num_data))
            return res
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: f3ed294875549679cb8d365e6604a4d4545de31b
Time: 2018-11-14
Author: balandat@fb.com
File Name: gpytorch/mlls/variational_elbo.py
Class Name: VariationalELBO
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: f3ed294875549679cb8d365e6604a4d4545de31b
Time: 2018-11-14
Author: balandat@fb.com
File Name: gpytorch/mlls/variational_elbo.py
Class Name: VariationalELBO
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: f3ed294875549679cb8d365e6604a4d4545de31b
Time: 2018-11-14
Author: balandat@fb.com
File Name: gpytorch/mlls/exact_marginal_log_likelihood.py
Class Name: ExactMarginalLogLikelihood
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: f3ed294875549679cb8d365e6604a4d4545de31b
Time: 2018-11-14
Author: balandat@fb.com
File Name: gpytorch/mlls/variational_elbo.py
Class Name: VariationalELBOEmpirical
Method Name: forward