e84e718f43b42aefb58d18d0afcd5580d4b67325,gpytorch/lazy/added_diag_lazy_tensor.py,AddedDiagLazyTensor,_svd,#AddedDiagLazyTensor#,134

Before Change


    @cached(name="svd")
    def _svd(self) -> Tuple["LazyTensor", Tensor, "LazyTensor"]:
        diag = self._diag_tensor.diag()
        if torch.equal(diag, diag[..., :1].expand(diag.shape)):
            U, S_, V = self._lazy_tensor.svd()
            S = S_ + diag  // this assumes all diagonal entries are positive
            return U, S, V

After Change



    @cached(name="svd")
    def _svd(self) -> Tuple["LazyTensor", Tensor, "LazyTensor"]:
        if isinstance(self._diag_tensor, ConstantDiagLazyTensor):
            U, S_, V = self._lazy_tensor.svd()
            S = S_ + self._diag_tensor.diag()  // this assumes all diagonal entries are positive
            return U, S, V
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: e84e718f43b42aefb58d18d0afcd5580d4b67325
Time: 2020-08-01
Author: balandat@fb.com
File Name: gpytorch/lazy/added_diag_lazy_tensor.py
Class Name: AddedDiagLazyTensor
Method Name: _svd


Project Name: arraiy/torchgeometry
Commit Name: a606a68ff74ed2b2e35f7079a1570310655e4e6d
Time: 2019-03-04
Author: edgar.riba@gmail.com
File Name: torchgeometry/core/depth_warper.py
Class Name: DepthWarper
Method Name: compute_projection_matrix


Project Name: cornellius-gp/gpytorch
Commit Name: e84e718f43b42aefb58d18d0afcd5580d4b67325
Time: 2020-08-01
Author: balandat@fb.com
File Name: gpytorch/lazy/added_diag_lazy_tensor.py
Class Name: AddedDiagLazyTensor
Method Name: _symeig