fd3a6fbaa2ca0b7b1fb70071fec33d7a4cebd14d,gpytorch/lazy/sum_lazy_tensor.py,SumLazyTensor,diag,#SumLazyTensor#,79

Before Change


            raise AttributeError("other must be a LazyTensor")

    def diag(self):
        diags = [lazy_tensor.diag().contiguous() for lazy_tensor in self.lazy_tensors]
        size = diags[0].size()
        res = sum(diag.view(-1) for diag in diags)
        res = res.view(size)
        return res

After Change


            raise AttributeError("other must be a LazyTensor")

    def diag(self):
        return sum(lazy_tensor.diag().contiguous() for lazy_tensor in self.lazy_tensors)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: fd3a6fbaa2ca0b7b1fb70071fec33d7a4cebd14d
Time: 2019-07-08
Author: balandat@fb.com
File Name: gpytorch/lazy/sum_lazy_tensor.py
Class Name: SumLazyTensor
Method Name: diag


Project Name: pytorch/fairseq
Commit Name: 6e4b7e22eeb79f7e1c39d862f10ec3e61e51c979
Time: 2017-11-08
Author: myleott@fb.com
File Name: generate.py
Class Name:
Method Name: main