98e1fc360539d530628b4b48b1270c62987396b4,gpytorch/lazy/lazy_tensor.py,LazyTensor,__add__,#LazyTensor#Any#,1600
Before Change
elif isinstance(other, Tensor):
other = lazify(other)
shape = _mul_broadcast_shape(self.shape, other.shape)
return SumLazyTensor(self.expand(shape), other.expand(shape))
else:
return SumLazyTensor(self, other)
def __div__(self, other):
After Change
other = lazify(other)
shape = _mul_broadcast_shape(self.shape, other.shape)
new_self = self if self.shape == shape else self._expand_batch(shape[:-2])
new_other = other if other.shape == shape else other._expand_batch(shape[:-2])
return SumLazyTensor(new_self, new_other)
else:
return SumLazyTensor(self, other)
def __div__(self, other):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 98e1fc360539d530628b4b48b1270c62987396b4
Time: 2020-06-09
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: __add__
Project Name: cornellius-gp/gpytorch
Commit Name: c517e0b8b34a85b8142b4669c152b6e62c02d8e2
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: expand
Project Name: cornellius-gp/gpytorch
Commit Name: 4053ced2e597263ffe1c439bca8ca46e7b798cd2
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_evaluated_kernel_tensor.py
Class Name: LazyEvaluatedKernelTensor
Method Name: _expand_batch
Project Name: cornellius-gp/gpytorch
Commit Name: e95aef6716ee8b2e0b647468ffe7f5bf37d4ce47
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/mul_lazy_tensor.py
Class Name: MulLazyTensor
Method Name: _expand_batch