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)