c63cc933782e2de32c9fe74c18b337b2bbe0f242,gpytorch/kernels/index_kernel.py,IndexKernel,__init__,#IndexKernel#Any#Any#Any#Any#Any#Any#,18
Before Change
covar_factor_bounds=(-100, 100),
log_var_bounds=(-100, 100),
):
if active_dims is not None and len(active_dims) > 1:
raise ValueError(
"Index must be with respect to a single column. Received {}".format(
active_dims
)
)
super(IndexKernel, self).__init__(active_dims=active_dims)
self.register_parameter(
name="covar_factor",
parameter=torch.nn.Parameter(torch.randn(n_tasks, rank)),
After Change
)
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: c63cc933782e2de32c9fe74c18b337b2bbe0f242
Time: 2018-07-19
Author: jrg365@cornell.edu
File Name: gpytorch/kernels/index_kernel.py
Class Name: IndexKernel
Method Name: __init__
Project Name: rusty1s/pytorch_geometric
Commit Name: e60669c5aa467d5c11a508c01b37c4ed8e352fa6
Time: 2021-02-15
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/supergat_conv.py
Class Name: SuperGATConv
Method Name: __init__
Project Name: facebookresearch/ParlAI
Commit Name: 548c67bbe7598c3221b83cf6ef216b848debac2c
Time: 2018-11-15
Author: roller@fb.com
File Name: parlai/agents/seq2seq/modules.py
Class Name: OutputLayer
Method Name: __init__