ad18add8ae7da04213813b5675b903bbf4be1ebd,gpytorch/lazy/kronecker_product_added_diag_lazy_tensor.py,KroneckerProductAddedDiagLazyTensor,_root_decomposition,#KroneckerProductAddedDiagLazyTensor#,192

Before Change


                    evals_, evecs_ = lt_.symeig(eigenvectors=True)
                    sub_evals.append(DiagLazyTensor(evals_ / dlt_.diag_values))
                    sub_evecs.append(evecs_)
                Lambda_I = KroneckerProductDiagLazyTensor(*sub_evals).add_jitter(1.0)
                S = KroneckerProductLazyTensor(*sub_evecs)
                return MatmulLazyTensor(S, Lambda_I.sqrt())
            else:
                // again, we compute the root decomposition by pulling across the diagonals

After Change


                // so that we compute
                // L = D^{1/2} Q (\kron a_i^{-1} \Lambda_i + I)^{1/2}
                //       = (\kron a_i^{1/2} Q_i)(\kron a_i^{-1} \Lambda_i + I)^{1/2}
                scaled_evecs_list = []
                for evec_, dlt_ in zip(evecs.lazy_tensors, dlt.lazy_tensors):
                    scaled_evecs_list.append(evec_ * dlt_.diag_values.sqrt())
                scaled_evecs = KroneckerProductLazyTensor(*scaled_evecs_list)
                return MatmulLazyTensor(scaled_evecs, evals_p_i_root)

            // again, we compute the root decomposition by pulling across the diagonals
            dlt_root = dlt.sqrt()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: cornellius-gp/gpytorch
Commit Name: 229456f698c7165b0e206c814ec781004d0c2d0b
Time: 2018-03-14
Author: gpleiss@gmail.com
File Name: gpytorch/variational/mvn_variational_strategy.py
Class Name: MVNVariationalStrategy
Method Name: kl_divergence