a3c1f36fe2b18b9c5193634765cf355902347c9d,gpytorch/kernels/index_kernel.py,IndexKernel,forward,#IndexKernel#Any#Any#,43
Before Change
)
def forward(self, i1, i2):
covar_matrix = self.covar_factor.matmul(self.covar_factor.transpose(-1, -2))
covar_matrix += self.log_var.exp().diag()
covar_matrix = covar_matrix.unsqueeze(0)
output_covar = covar_matrix.index_select(-2, i1.view(-1)).index_select(
-1, i2.view(-1)
)
return output_covar
After Change
logger.warning("Cannot infer appropriate prior from bounds. Ignoring bounds.")
def forward(self, i1, i2):
covar_matrix = _eval_covar_matrix(self.covar_factor, self.log_var).unsqueeze(0)
return covar_matrix.index_select(-2, i1.view(-1)).index_select(-1, i2.view(-1))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: a3c1f36fe2b18b9c5193634765cf355902347c9d
Time: 2018-07-19
Author: balandat@fb.com
File Name: gpytorch/kernels/index_kernel.py
Class Name: IndexKernel
Method Name: forward
Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: cc8880d39c4a97ed5af943e623d6d02e26f1ebad
Time: 2019-04-18
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: _sample