fca285821740bcc013bfe27b5dd11b7fdb9b9812,gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py,KroneckerProductAddedDiagLazyTensor,_solve,#KroneckerProductAddedDiagLazyTensor#,49

Before Change


                dlt = self.diag_tensor.to(torch.double)

                KDinv = KroneckerProductLazyTensor(
                    *[tfull.matmul(tdiag.inverse()) for tfull, tdiag in zip(lt.lazy_tensors, dlt.lazy_tensors)]
                )
                // TODO: Figure out how to cache the decompositon for use in later solves
                Lambda, S = KDinv.symeig(eigenvectors=True)

After Change


                // K^{-1} b - K^{-1} (S (Lambda + I)^{-1} S^T b).
                // Each sub-matrix D_i^{-1} has constant diagonal, so we may scale the eigenvalues of the
                // eigendecomposition of K_i by its inverse to get an eigendecomposition of K_i D_i^{-1}.
                sub_evals, sub_evecs = [], []
                for lt_, dlt_ in zip(lt.lazy_tensors, dlt.lazy_tensors):
                    evals_, evecs_ = lt_.symeig(eigenvectors=True)
                    sub_evals.append(DiagLazyTensor(evals_ / dlt_.diag_values))
                    sub_evecs.append(evecs_)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: fca285821740bcc013bfe27b5dd11b7fdb9b9812
Time: 2021-01-18
Author: balandat@fb.com
File Name: gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py
Class Name: KroneckerProductAddedDiagLazyTensor
Method Name: _solve


Project Name: PIQuIL/QuCumber
Commit Name: 76b2432b1c1ee03c80895a5c7d49cde485323102
Time: 2019-12-22
Author: emerali@users.noreply.github.com
File Name: qucumber/nn_states/complex_wavefunction.py
Class Name: ComplexWaveFunction
Method Name: rotated_gradient


Project Name: uTensor/uTensor
Commit Name: 0209a849ef4d520367c2fa880e5605d03106d22d
Time: 2020-06-16
Author: michael.bartling15@gmail.com
File Name: python/test_scripts/gen_fc.py
Class Name:
Method Name: gen_test