4e82a8a494e4f6e103425557d15ac2247f7835dc,gpytorch/kernels/kernel.py,ProductKernel,forward,#ProductKernel#Any#Any#,257

Before Change


        self.kernels = ModuleList(kernels)

    def forward(self, x1, x2):
        return prod([k(x1, x2).evaluate_kernel() for k in self.kernels])

After Change


        res = self.kernels[0](x1, x2, **params)
        for kern in self.kernels[1:]:
            next_term = kern(x1, x2, **params)
            if isinstance(next_term, LazyEvaluatedKernelTensor):
                next_term = next_term.evaluate_kernel()
            res = res * next_term
        return res
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 4e82a8a494e4f6e103425557d15ac2247f7835dc
Time: 2018-10-01
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/kernel.py
Class Name: ProductKernel
Method Name: forward


Project Name: rwth-i6/returnn-experiments
Commit Name: a21861f99e3dc4b778fd776b3e8e00dbaee988ca
Time: 2021-03-27
Author: albzey@gmail.com
File Name: common/models/encoder/blstm_cnn_specaug.py
Class Name:
Method Name: make_net


Project Name: geomstats/geomstats
Commit Name: a2e39e8a3c0586ce0c1cca407d1738565a75e705
Time: 2020-01-16
Author: ninamio78@gmail.com
File Name: geomstats/backend/pytorch_random.py
Class Name:
Method Name: choice