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

Before Change


        else:
            log_prior = torch.zeros_like(log_likelihood)
            for _, prior, params_and_tfs, prior_tf in self.named_priors():
                params = [p if ptf is None else ptf(p) for p, ptf in params_and_tfs]
                lp_arg = params[0] if prior_tf is None else prior_tf(*params)
                log_prior.add_(prior.log_prob(lp_arg).sum())
            return log_likelihood, kl_divergence, log_prior.div(self.num_data)

After Change


        else:
            log_prior = torch.zeros_like(log_likelihood)
            for _, prior, closure in self.named_priors():
                log_prior.add_(prior.log_prob(closure()).sum())
            return log_likelihood, kl_divergence, log_prior.div(self.num_data)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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


Project Name: pantsbuild/pants
Commit Name: 2b91d5d7f1a43940f43c5d31fcd91c663541b4a8
Time: 2014-07-25
Author: itykaul@gmail.com
File Name: src/python/pants/goal/context.py
Class Name: Context
Method Name: targets


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