43c471faef2844c4d95636e888018239ab4ea6a9,gpytorch/lazy/lazy_tensor.py,LazyTensor,inv_quad,#LazyTensor#Any#Any#,963
Before Change
"Got a {} of size {}.".format(self.__class__.__name__, self.size())
)
if self.dim() == 2 and tensor.dim() == 1:
if self.shape[-1] != tensor.numel():
raise RuntimeError(
"LazyTensor (size={}) cannot be multiplied with right-hand-side Tensor (size={}).".format(
self.shape, tensor.shape
)
)
elif self.dim() != tensor.dim():
raise RuntimeError(
"LazyTensor (size={}) and right-hand-side Tensor (size={}) should have the same number "
"of dimensions.".format(self.shape, tensor.shape)
)
elif self.shape[-1] != tensor.shape[-2]:
raise RuntimeError(
"LazyTensor (size={}) cannot be multiplied with right-hand-side Tensor (size={}).".format(
self.shape, tensor.shape
)
)
args = (tensor,) + self.representation()
func = InvQuad.apply
inv_quad_term = func(self.representation_tree(), *args)
After Change
)
)
args = (tensor.expand(*result_shape[:-2], *tensor.shape[-2:]),) + self.representation()
func = InvQuad.apply
inv_quad_term = func(self.representation_tree(), *args)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 43c471faef2844c4d95636e888018239ab4ea6a9
Time: 2020-07-29
Author: gardner.jake@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: inv_quad
Project Name: cornellius-gp/gpytorch
Commit Name: 5272720e291d084e775df43a4e1920fedb48887b
Time: 2019-05-10
Author: balandat@fb.com
File Name: gpytorch/models/exact_gp.py
Class Name: ExactGP
Method Name: get_fantasy_model
Project Name: cornellius-gp/gpytorch
Commit Name: b2951813547426828d313a80c52de8a619e99731
Time: 2018-11-26
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/constant_mul_lazy_tensor.py
Class Name: ConstantMulLazyTensor
Method Name: __init__