c517e0b8b34a85b8142b4669c152b6e62c02d8e2,gpytorch/lazy/lazy_tensor.py,LazyTensor,expand,#LazyTensor#,599
Before Change
raise RuntimeError("Invalid arguments {} to expand.".format(sizes))
current_shape = torch.Size([1 for _ in range(len(shape) - self.dim())] + list(self.shape))
repeat_shape = torch.Size(
[expand_size // current_size for expand_size, current_size in zip(shape, current_shape)]
)
return self.repeat(*repeat_shape)
@cached
def evaluate(self):
After Change
else:
raise RuntimeError("Invalid arguments {} to expand.".format(sizes))
res = self._expand_batch(batch_shape=shape[:-2])
return res
@cached
def evaluate(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
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: e95aef6716ee8b2e0b647468ffe7f5bf37d4ce47
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/mul_lazy_tensor.py
Class Name: MulLazyTensor
Method Name: _expand_batch
Project Name: cornellius-gp/gpytorch
Commit Name: 98e1fc360539d530628b4b48b1270c62987396b4
Time: 2020-06-09
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/sum_lazy_tensor.py
Class Name: SumLazyTensor
Method Name: __add__