4203fde78e0522513258a60466f1575e161b9138,gpytorch/variational/whitened_variational_strategy.py,WhitenedVariationalStrategy,initialize_variational_dist,#WhitenedVariationalStrategy#,55
Before Change
return kl_divergence
def initialize_variational_dist(self):
if not self.variational_params_initialized.item():
prior_dist = self.prior_distribution
inv_prior_dist = torch.distributions.MultivariateNormal(
prior_dist.mean,
prior_dist.lazy_covariance_matrix.add_jitter()
.evaluate()
.double()
.inverse()
.type_as(prior_dist.covariance_matrix),
)
self.variational_distribution.initialize_variational_distribution(inv_prior_dist)
self.variational_params_initialized.fill_(1)
def forward(self, x):
The :func:`~gpytorch.variational.VariationalStrategy.forward` method determines how to marginalize out the
inducing point function values. Specifically, forward defines how to transform a variational distribution
After Change
return kl_divergence
def initialize_variational_dist(self):
prior_dist = self.prior_distribution
inv_prior_dist = torch.distributions.MultivariateNormal(
prior_dist.mean,
prior_dist.lazy_covariance_matrix.add_jitter()
.evaluate()
.double()
.inverse()
.type_as(prior_dist.covariance_matrix),
)
self.variational_distribution.initialize_variational_distribution(inv_prior_dist)
def forward(self, x):
The :func:`~gpytorch.variational.VariationalStrategy.forward` method determines how to marginalize out the
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 12
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 4203fde78e0522513258a60466f1575e161b9138
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/variational/whitened_variational_strategy.py
Class Name: WhitenedVariationalStrategy
Method Name: initialize_variational_dist
Project Name: cornellius-gp/gpytorch
Commit Name: 80bfc0e92ca2a52621414fb4de5cc8a2bb5474b6
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/variational/variational_strategy.py
Class Name: VariationalStrategy
Method Name: initialize_variational_dist
Project Name: cornellius-gp/gpytorch
Commit Name: 4203fde78e0522513258a60466f1575e161b9138
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/variational/variational_strategy.py
Class Name: VariationalStrategy
Method Name: initialize_variational_dist
Project Name: cornellius-gp/gpytorch
Commit Name: 80bfc0e92ca2a52621414fb4de5cc8a2bb5474b6
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/variational/whitened_variational_strategy.py
Class Name: WhitenedVariationalStrategy
Method Name: initialize_variational_dist