bfc06c52e33e5d78bc4e9b332a5a7ac16fdcca46,gpytorch/lazy/mul_lazy_variable.py,MulLazyVariable,_lanczos_quadrature_form,#MulLazyVariable#,191

Before Change


        return closure

    def _lanczos_quadrature_form(self, *args):
        if not hasattr(self, "_lanczos_quadrature"):
            n = self.size()[0]
            z = args[0].new(n, 1).normal_()
            z = z / torch.norm(z, 2, 0)

            def tensor_matmul_closure(rhs):
                return self._matmul_closure_factory(*args)(rhs)

            Q, T = StochasticLQ(cls=type(z), max_iter=self.max_iter).lanczos_batch(tensor_matmul_closure, z)
            Q = Q[0]
            T = T[0]
            self._lanczos_quadrature = Q, T
        return self._lanczos_quadrature

    def _derivative_quadratic_form_factory(self, *args):
        args_index = []
        args_index.append(0)

After Change


        Q, T = StochasticLQ(cls=type(z), max_iter=self.max_iter).lanczos_batch(tensor_matmul_closure, z)
        Q = Q[0]
        T = T[0]
        return Q, T

    def _derivative_quadratic_form_factory(self, *args):
        args_index = []
        args_index.append(0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: bfc06c52e33e5d78bc4e9b332a5a7ac16fdcca46
Time: 2017-10-01
Author: ruihan.wu14@gmail.com
File Name: gpytorch/lazy/mul_lazy_variable.py
Class Name: MulLazyVariable
Method Name: _lanczos_quadrature_form


Project Name: cornellius-gp/gpytorch
Commit Name: f5735faec062a3273d943368a848ba61b22fa6c6
Time: 2017-06-26
Author: gpleiss@gmail.com
File Name: gpytorch/math/functions/invmv.py
Class Name: Invmv
Method Name: __call__


Project Name: cornellius-gp/gpytorch
Commit Name: 7064d5e58e31a102d844a2c31dc8cd5adaeac3fe
Time: 2020-07-17
Author: balandat@fb.com
File Name: gpytorch/utils/memoize.py
Class Name:
Method Name: add_to_cache