2395ae7ddd3f2a473669359eb26e89f295f892d3,gpytorch/kernels/cosine_kernel.py,CosineKernel,forward,#CosineKernel#Any#Any#,98
Before Change
def forward(self, x1, x2, **params):
x1_ = x1.div(self.period_length)
x2_ = x2.div(self.period_length)
diff = self._covar_sq_dist(x1_, x2_, **params).sqrt_()
res = torch.cos(diff.mul(math.pi))
return res
After Change
def forward(self, x1, x2, **params):
x1_ = x1.div(self.period_length)
x2_ = x2.div(self.period_length)
x1_, x2_ = self._create_input_grid(x1_, x2_, **params)
diff = torch.norm((x1_ - x2_).abs(), 2, -1)
res = torch.cos(diff.mul(math.pi))
return res
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 2395ae7ddd3f2a473669359eb26e89f295f892d3
Time: 2018-12-19
Author: gardner.jake@gmail.com
File Name: gpytorch/kernels/cosine_kernel.py
Class Name: CosineKernel
Method Name: forward
Project Name: cornellius-gp/gpytorch
Commit Name: 2395ae7ddd3f2a473669359eb26e89f295f892d3
Time: 2018-12-19
Author: gardner.jake@gmail.com
File Name: gpytorch/kernels/cosine_kernel.py
Class Name: CosineKernel
Method Name: forward
Project Name: cornellius-gp/gpytorch
Commit Name: 2395ae7ddd3f2a473669359eb26e89f295f892d3
Time: 2018-12-19
Author: gardner.jake@gmail.com
File Name: gpytorch/kernels/matern_kernel.py
Class Name: MaternKernel
Method Name: forward
Project Name: cornellius-gp/gpytorch
Commit Name: 2395ae7ddd3f2a473669359eb26e89f295f892d3
Time: 2018-12-19
Author: gardner.jake@gmail.com
File Name: gpytorch/kernels/periodic_kernel.py
Class Name: PeriodicKernel
Method Name: forward