4c6458b841bb49610b5cf6b9fbab94df5cad85ee,gpytorch/lazy/interpolated_lazy_tensor.py,InterpolatedLazyTensor,zero_mean_mvn_samples,#InterpolatedLazyTensor#Any#,439
Before Change
def zero_mean_mvn_samples(self, num_samples):
base_samples = self.base_lazy_tensor.zero_mean_mvn_samples(num_samples)
if self.ndimension() == 3:
res = left_interp(
self.left_interp_indices, self.left_interp_values, base_samples.permute(1, 2, 0).contiguous()
)
return res.permute(2, 0, 1).contiguous()
else:
res = left_interp(
self.left_interp_indices, self.left_interp_values, base_samples.permute(1, 0).contiguous()
)
return res.permute(1, 0).contiguous()
def _getitem_nonbatch(self, row_index, col_index, first_tensor_index_dim=None):
Given an index over rows and columns, gets those items from the LazyTensor.
Implementing this is not necessary, but it improves performance
After Change
batch_iter = tuple((i + 1) for i in range(base_samples.dim() - 1))
base_samples = base_samples.permute(*batch_iter, 0)
res = left_interp(self.left_interp_indices, self.left_interp_values, base_samples).contiguous()
batch_iter = tuple(i for i in range(res.dim() - 1 ))
return res.permute(-1, *batch_iter).contiguous()
def _getitem_nonbatch(self, row_index, col_index, first_tensor_index_dim=None):
Given an index over rows and columns, gets those items from the LazyTensor.
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances Project Name: cornellius-gp/gpytorch
Commit Name: 4c6458b841bb49610b5cf6b9fbab94df5cad85ee
Time: 2019-01-23
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/interpolated_lazy_tensor.py
Class Name: InterpolatedLazyTensor
Method Name: zero_mean_mvn_samples
Project Name: cornellius-gp/gpytorch
Commit Name: b0eecef1c8acdfe6e65f1e96ff6e26d2bc43e7db
Time: 2018-11-09
Author: balandat@fb.com
File Name: gpytorch/lazy/diag_lazy_tensor.py
Class Name: DiagLazyTensor
Method Name: _size
Project Name: cornellius-gp/gpytorch
Commit Name: 6bf26a0ab5c0ea9e332216d1d48d4ce3c03a2f8d
Time: 2019-03-20
Author: jake.gardner@uber.com
File Name: gpytorch/kernels/kernel.py
Class Name: Kernel
Method Name: size
Project Name: cornellius-gp/gpytorch
Commit Name: b0eecef1c8acdfe6e65f1e96ff6e26d2bc43e7db
Time: 2018-11-09
Author: balandat@fb.com
File Name: gpytorch/lazy/diag_lazy_tensor.py
Class Name: DiagLazyTensor
Method Name: evaluate