70b1a566ce1dab1ab278f99f15cd4f157ad3ee5c,gpytorch/kernels/index_kernel.py,IndexKernel,__init__,#IndexKernel#Any#Any#Any#Any#,16

Before Change


    def __init__(self, n_tasks, rank=1, prior=None, active_dims=None):
        if rank > n_tasks:
            raise RuntimeError("Cannot create a task covariance matrix larger than the number of tasks")
        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)))
        self.register_parameter(name="log_var", parameter=torch.nn.Parameter(torch.randn(n_tasks)))
        if prior is not None:

After Change


            raise RuntimeError("Cannot create a task covariance matrix larger than the number of tasks")
        super(IndexKernel, self).__init__()
        self.register_parameter(
            name="covar_factor", parameter=torch.nn.Parameter(torch.randn(batch_size, n_tasks, rank))
        )
        self.register_parameter(name="log_var", parameter=torch.nn.Parameter(torch.randn(batch_size, n_tasks)))
        if prior is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 70b1a566ce1dab1ab278f99f15cd4f157ad3ee5c
Time: 2018-09-28
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/index_kernel.py
Class Name: IndexKernel
Method Name: __init__


Project Name: mne-tools/mne-python
Commit Name: 0656d8eef747ecb0d86631c18675feba3ab1fcae
Time: 2019-02-15
Author: alexandre.gramfort@m4x.org
File Name: mne/simulation/evoked.py
Class Name:
Method Name: _generate_noise


Project Name: cornellius-gp/gpytorch
Commit Name: 2185f24dda7b33194d4240b2a6301230ce1cd7f5
Time: 2019-04-02
Author: jake.gardner@uber.com
File Name: gpytorch/kernels/spectral_mixture_kernel.py
Class Name: SpectralMixtureKernel
Method Name: __init__