Use symeig properly in logdet
import torch
from ..settings import skip_logdet_forward
-from ..utils.memoize import get_from_cache
from .added_diag_lazy_tensor import AddedDiagLazyTensor
from .diag_lazy_tensor import DiagLazyTensor
@@ -47,9 +46,6 @@ class KroneckerProductAddedDiagLazyTensor(AddedDiagLazyTensor):
return inv_quad_term, logdet_term
def _logdet(self):
- try:
- evals, _ = get_from_cache(self.lazy_tensor, "symeig")
- except RuntimeError:
evals, _ = self.lazy_tensor.symeig(eigenvectors=False)
evals_plus_diag = evals + self.diag_tensor.diag()
return torch.log(evals_plus_diag).sum(dim=-1)
