From 90d4f015f5416a6e14c15c712ebd2bea41865f31 Mon Sep 17 00:00:00 2001 From: sahakpetros Date: Thu, 12 Sep 2024 00:14:47 -0400 Subject: [PATCH] fix bug #2585 fix bug 2585 https://github.com/cornellius-gp/gpytorch/issues/2585 --- gpytorch/mlls/leave_one_out_pseudo_likelihood.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gpytorch/mlls/leave_one_out_pseudo_likelihood.py b/gpytorch/mlls/leave_one_out_pseudo_likelihood.py index becb3b06e..ea0b84d35 100644 --- a/gpytorch/mlls/leave_one_out_pseudo_likelihood.py +++ b/gpytorch/mlls/leave_one_out_pseudo_likelihood.py @@ -54,6 +54,7 @@ def forward(self, function_dist: MultivariateNormal, target: Tensor, *params) -> :param torch.Tensor target: :math:`\mathbf y` The target values :param dict kwargs: Additional arguments to pass to the likelihood's forward function. """ + target = target.flatten() output = self.likelihood(function_dist, *params) m, L = output.mean, output.lazy_covariance_matrix.cholesky(upper=False) m = m.reshape(*target.shape)