// Cache the kernel matrix with the cached CG calls
if self.training:
self._memoize_cache["prior_distribution_memo"] = MultivariateNormal(induc_mean, induc_induc_covar)
// Compute predictive mean
inv_products = induc_induc_covar.inv_matmul(induc_data_covar, left_tensors.transpose(-1, -2))
After Change
// Cache the kernel matrix with the cached CG calls
if self.training:
prior_dist = MultivariateNormal(induc_mean, induc_induc_covar)
add_to_cache(self, "prior_distribution_memo", prior_dist)
// Compute predictive mean
inv_products = induc_induc_covar.inv_matmul(induc_data_covar, left_tensors.transpose(-1, -2))
predictive_mean = torch.add(test_mean, inv_products[..., 0, :])