if not isinstance(likelihood, _GaussianLikelihoodBase):
raise RuntimeError("Likelihood must be Gaussian for exact inference")
super().__init__(likelihood, model, *args, **kwargs)
self.register_buffer("gamma", torch.tensor(gamma))
def _log_likelihood_term(self, variational_dist_f, target, *args, **kwargs):
muf, varf = variational_dist_f.mean, variational_dist_f.variance
After Change
if not isinstance(likelihood, _GaussianLikelihoodBase):
raise RuntimeError("Likelihood must be Gaussian for exact inference")
super().__init__(likelihood, model, *args, **kwargs)
if gamma <= 1.0:
raise ValueError("gamma should be > 1.0")
self.gamma = gamma
def _log_likelihood_term(self, variational_dist_f, target, *args, **kwargs):
shifted_gamma = self.gamma - 1