f76a4dabb4cd38ee58d01a35c5b511e224d060d2,gpytorch/lazy/sum_batch_lazy_tensor.py,SumBatchLazyTensor,_matmul,#SumBatchLazyTensor#Any#,29

Before Change


        rhs = rhs.unsqueeze(0)
        rhs_size = list(rhs.size())
        rhs_size[0] = self.batch_size()
        rhs = rhs.expand(*rhs_size)

        res = self.base_lazy_tensor._matmul(rhs)
        if self.sum_batch_size is not None:
            res = res.view(-1, self.sum_batch_size, res.size(1), res.size(2))

After Change


            rhs = rhs.expand(self.base_lazy_tensor.size(0), *tuple(rhs.size())[1:])
        else:
            rhs = rhs.unsqueeze(1)
            rhs = rhs.expand(rhs.size(0), self.num_blocks, *tuple(rhs.size())[2:])
            rhs = rhs.contiguous().view(-1, rhs.size(-2), rhs.size(-1))

        res = self.base_lazy_tensor._matmul(rhs)

        if self.num_blocks is not None:
            res = res.view(-1, self.num_blocks, res.size(1), res.size(2))
        res = res.sum(-3)

        if isvector:
            res = res.squeeze(-1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: f76a4dabb4cd38ee58d01a35c5b511e224d060d2
Time: 2018-09-17
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/sum_batch_lazy_tensor.py
Class Name: SumBatchLazyTensor
Method Name: _matmul


Project Name: cornellius-gp/gpytorch
Commit Name: 8f27fae607562177d6b840a0c0db2c67a95a88d8
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/distributions/multivariate_normal.py
Class Name: _MultivariateNormalBase
Method Name: variance


Project Name: cornellius-gp/gpytorch
Commit Name: 79725f0aeb9a9f93617e291345c0b81add027373
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/distributions/multivariate_normal.py
Class Name: _MultivariateNormalBase
Method Name: variance