5ea152e9f0d71e1dfdefac81cf7d60238e130c60,gpytorch/models/pyro/_pyro_mixin.py,_PyroMixin,pyro_model,#_PyroMixin#Any#Any#Any#,20
Before Change
def pyro_model(self, input, beta=1.0, name_prefix=""):
// Inducing values p(u)
with pyro.poutine.scale(scale=beta):
u_samples = pyro.sample(self.name_prefix + ".u", self.variational_strategy.prior_distribution)
// Include term for GPyTorch priors
log_prior = torch.tensor(0.0, dtype=u_samples.dtype, device=u_samples.device)
for _, prior, closure, _ in self.named_priors():
After Change
// Inducing values p(u)
with pyro.poutine.scale(scale=beta):
prior_distribution = self.variational_strategy.prior_distribution
prior_distribution = prior_distribution.to_event(len(prior_distribution.batch_shape))
u_samples = pyro.sample(name_prefix + ".u", prior_distribution)
// Include term for GPyTorch priors
log_prior = torch.tensor(0.0, dtype=u_samples.dtype, device=u_samples.device)
for _, prior, closure, _ in self.named_priors():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 5ea152e9f0d71e1dfdefac81cf7d60238e130c60
Time: 2020-08-04
Author: gpleiss@gmail.com
File Name: gpytorch/models/pyro/_pyro_mixin.py
Class Name: _PyroMixin
Method Name: pyro_model
Project Name: cornellius-gp/gpytorch
Commit Name: 2ae4f8999145c3d7a7a897dff4258a625a69076b
Time: 2019-11-10
Author: gpleiss@gmail.com
File Name: gpytorch/models/pyro/_pyro_mixin.py
Class Name: _PyroMixin
Method Name: pyro_guide
Project Name: uber/pyro
Commit Name: f6e75e7593d5305b1b6c9ce1a5b2eee8a3c7f38a
Time: 2019-11-15
Author: fritzo@uber.com
File Name: tests/infer/test_smcfilter.py
Class Name: SmokeModel
Method Name: step