6ff31af0d8af54c6b3c853cdc37281d635b84637,gpytorch/lazy/added_diag_lazy_variable.py,AddedDiagLazyVariable,_preconditioner,#AddedDiagLazyVariable#,51

Before Change


                tensor, self._piv_chol_self, self._woodbury_cache, self._diag_var.diag()
            )

        return precondition_closure

    def inv_quad_log_det(self, inv_quad_rhs=None, log_det=False):
        inv_quad_term, log_det_term = super(
            AddedDiagLazyVariable, self

After Change



        // log_det correction
        if not hasattr(self, "_precond_log_det_cache"):
            lr_flipped = self._piv_chol_self.matmul(
                self._piv_chol_self.transpose(-2, -1).
                div(self._diag_var.diag().unsqueeze(1))
            )
            lr_flipped = lr_flipped + torch.eye(
                n=lr_flipped.size(0), dtype=lr_flipped.dtype, device=lr_flipped.device
            )
            ld_one = lr_flipped.potrf().diag().log().sum() * 2
            ld_two = self._diag_var.diag().data.log().sum()
            self._precond_log_det_cache = ld_one + ld_two

        return precondition_closure, self._precond_log_det_cache
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 7

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 6ff31af0d8af54c6b3c853cdc37281d635b84637
Time: 2018-05-22
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/added_diag_lazy_variable.py
Class Name: AddedDiagLazyVariable
Method Name: _preconditioner


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: CNNNet
Method Name: user_representation


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: PoolNet
Method Name: user_representation


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 67addeaef37856340f2d220af9a7cad3c4256235
Time: 2019-01-03
Author: karandesai281196@gmail.com
File Name: visdialch/decoders/disc.py
Class Name: DiscriminativeDecoder
Method Name: forward


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 8af5800b9a74cf7b2c8d2577b7d9be3ef987f26b
Time: 2021-04-09
Author: florian@flova.de
File Name: detect.py
Class Name:
Method Name: detect_image