1e96334c79060b60c51c7d3b85bea7048d8e1ad2,gpytorch/kernels/grid_kernel.py,GridKernel,update_grid,#GridKernel#Any#,55
Before Change
if not self.interpolation_mode:
full_grid = create_data_from_grid(self.grid)
self.full_grid.detach().resize_as_(full_grid).copy_(full_grid)
if hasattr(self, "_cached_kernel_mat"):
del self._cached_kernel_mat
return self
After Change
if len(grid) != self.num_dims:
raise RuntimeError("New grid should have the same number of dimensions as before.")
for i in range(self.num_dims):
setattr(self, f"grid_{i}", grid[i])
if not self.interpolation_mode:
self.full_grid = create_data_from_grid(self.grid)
if hasattr(self, "_cached_kernel_mat"):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: cornellius-gp/gpytorch
Commit Name: 1e96334c79060b60c51c7d3b85bea7048d8e1ad2
Time: 2019-09-29
Author: kaw293@cornell.edu
File Name: gpytorch/kernels/grid_kernel.py
Class Name: GridKernel
Method Name: update_grid
Project Name: cornellius-gp/gpytorch
Commit Name: 3879bcde8d42c619c96b6483dba14a76a8e5f00b
Time: 2019-09-29
Author: kaw293@cornell.edu
File Name: gpytorch/utils/grid.py
Class Name:
Method Name: create_data_from_grid
Project Name: pyprob/pyprob
Commit Name: 5ee892637d801457c48f5d5c47f319e7ccc537fb
Time: 2017-04-04
Author: atilimgunes.baydin@gmail.com
File Name: modules.py
Class Name: Artifact
Method Name: loss