Skip to content

Commit e19a57e

Browse files
committed
Fix failing test
DenseLinearOperator expects a torch.tensor so we convert the linear operator to dense.
1 parent 33662d1 commit e19a57e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpytorch/models/exact_prediction_strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def get_fantasy_strategy(self, inputs, targets, full_inputs, full_targets, full_
222222
full_inputs = [fi.expand(fant_batch_shape + fi.shape) for fi in full_inputs]
223223
full_mean = full_mean.expand(fant_batch_shape + full_mean.shape)
224224
full_covar = BatchRepeatLinearOperator(full_covar, repeat_shape)
225-
new_root = BatchRepeatLinearOperator(DenseLinearOperator(new_root), repeat_shape)
225+
new_root = BatchRepeatLinearOperator(DenseLinearOperator(new_root.to_dense()), repeat_shape)
226226
# no need to repeat the covar cache, broadcasting will do the right thing
227227

228228
if isinstance(full_output, MultitaskMultivariateNormal):

0 commit comments

Comments
 (0)