Remove extraneous code from SumBatchLazyTensor
@@ -28,33 +28,6 @@ class SumBatchLazyTensor(BlockLazyTensor):
other = other.contiguous().view(*shape).expand(*expand_shape)
return other
- """
- def _exact_predictive_covar_inv_quad_form_cache(self, train_train_covar_inv_root, test_train_covar):
- if self.num_blocks is None:
- train_train_covar_inv_root = train_train_covar_inv_root.unsqueeze(0)
- train_train_covar_inv_root = train_train_covar_inv_root.expand(
- self.base_lazy_tensor.size(0), train_train_covar_inv_root.size(-2), train_train_covar_inv_root.size(-1)
- )
- else:
- train_train_covar_inv_root = train_train_covar_inv_root.repeat(self.num_blocks, 1, 1)
- return self.base_lazy_tensor._exact_predictive_covar_inv_quad_form_cache(
- train_train_covar_inv_root, test_train_covar.base_lazy_tensor
- )
-
- def _exact_predictive_covar_inv_quad_form_root(self, precomputed_cache, test_train_covar):
- # Here the precomputed cache is a list
- # where each component in the list is the precomputed cache for each component lazy tensor
- res = self.base_lazy_tensor._exact_predictive_covar_inv_quad_form_root(
- precomputed_cache, test_train_covar.base_lazy_tensor
- )
- if self.num_blocks is not None:
- res = res.view(-1, self.num_blocks, res.size(1), res.size(2))
- res = res.sum(1)
- else:
- res = res.sum(0)
- return res
- """
-
def _get_indices(self, row_index, col_index, *batch_indices):
# Create an extra index for the summed dimension
sum_index = torch.arange(0, self.base_lazy_tensor.size(-3), device=self.device)
