60a342edc8b501802135df44869353cc8604d838,gpytorch/lazy/kronecker_product_lazy_variable.py,KroneckerProductLazyVariable,_matmul_closure_factory,#KroneckerProductLazyVariable#,31
Before Change
def _matmul_closure_factory(self, *args):
if len(args) == 1:
columns, = args
def closure(mat2):
return sym_kronecker_product_toeplitz_matmul(columns, mat2)
After Change
sub_matmul_closures = []
i = 0
for lazy_var in self.lazy_vars:
len_repr = len(lazy_var.representation())
sub_matmul_closure = lazy_var._matmul_closure_factory(*args[i:i + len_repr])
sub_matmul_closures.append(sub_matmul_closure)
i = i + len_repr
def closure(tensor):
is_vec = tensor.ndimension() == 1
if is_vec:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 60a342edc8b501802135df44869353cc8604d838
Time: 2018-01-11
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/kronecker_product_lazy_variable.py
Class Name: KroneckerProductLazyVariable
Method Name: _matmul_closure_factory
Project Name: cornellius-gp/gpytorch
Commit Name: a60251aef9aaf35b42261e39e9cbf34c0ae10426
Time: 2017-06-28
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/rbf_kernel.py
Class Name: RBFKernel
Method Name: forward
Project Name: cornellius-gp/gpytorch
Commit Name: b53f2d7d650106a2ff175c2146b4ab897a3389d7
Time: 2021-02-22
Author: wjm363@nyu.edu
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: diagonalization