157041a86ecda19d43967fc3028d7b48fe17b243,gpytorch/variational/variational_strategy.py,VariationalStrategy,prior_distribution,#VariationalStrategy#,63
Before Change
this is done simply by calling the user defined GP prior on the inducing point data directly.
out = self.model.forward(self.inducing_points)
res = MultivariateNormal(
out.mean, out.lazy_covariance_matrix.add_jitter()
)
return res
def kl_divergence(self):
variational_dist_u = self.variational_distribution.variational_distribution
After Change
@property
@cached(name="prior_distribution_memo")
def prior_distribution(self):
zeros = torch.zeros_like(self.inducing_points[..., 0])
ones = torch.ones_like(zeros)
res = MultivariateNormal(zeros, DiagLazyTensor(ones))
return res
def forward(self, x):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: cornellius-gp/gpytorch
Commit Name: 157041a86ecda19d43967fc3028d7b48fe17b243
Time: 2019-11-10
Author: gpleiss@gmail.com
File Name: gpytorch/variational/variational_strategy.py
Class Name: VariationalStrategy
Method Name: prior_distribution
Project Name: cornellius-gp/gpytorch
Commit Name: 76c081b840cd71b20d8ac8692b312ebef95eae75
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/models/exact_prediction_strategies.py
Class Name: DefaultPredictionStrategy
Method Name: exact_predictive_covar
Project Name: cornellius-gp/gpytorch
Commit Name: 30ca6105f64f1cbbdb7f012bc848ed840e6f3682
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/models/exact_prediction_strategies.py
Class Name: DefaultPredictionStrategy
Method Name: exact_predictive_covar