d278768807dff0c1920795073a219577571959d7,gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py,KroneckerProductAddedDiagLazyTensor,logdet,#KroneckerProductAddedDiagLazyTensor#,103
Before Change
def logdet(self):
noise = self._diag_tensor[0, 0]
sub_eigs = []
for lazy_tensor in self._lazy_tensor.lazy_tensors:
sub_eigs.append(lazy_tensor.evaluate().symeig(eigenvectors=True)[0][:, 0].unsqueeze(-1))
eigs = sub_eigs[0].matmul(sub_eigs[1].t())
After Change
def logdet(self):
noise = self._diag_tensor[0, 0]
sub_eigs = [DiagLazyTensor(svd_decomp.S) for svd_decomp in self._kron_svd]
sub_eigs_kronecker = KroneckerProductLazyTensor(*sub_eigs).diag()
return torch.log(sub_eigs_kronecker + noise).sum()
@property
def _kron_svd(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: d278768807dff0c1920795073a219577571959d7
Time: 2020-06-26
Author: wjm363@nyu.edu
File Name: gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py
Class Name: KroneckerProductAddedDiagLazyTensor
Method Name: logdet
Project Name: cornellius-gp/gpytorch
Commit Name: ad18add8ae7da04213813b5675b903bbf4be1ebd
Time: 2021-02-10
Author: wjm363@nyu.edu
File Name: gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py
Class Name: KroneckerProductAddedDiagLazyTensor
Method Name: _root_decomposition
Project Name: cornellius-gp/gpytorch
Commit Name: ad18add8ae7da04213813b5675b903bbf4be1ebd
Time: 2021-02-10
Author: wjm363@nyu.edu
File Name: gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py
Class Name: KroneckerProductAddedDiagLazyTensor
Method Name: _root_inv_decomposition