5b629fe89f1fdf7dd4126135825149ff848128be,gpytorch/inference/posterior_models.py,_ExactGPPosterior,__init__,#_ExactGPPosterior#Any#Any#Any#,15

Before Change


        train_y = train_y or torch.Tensor()
        if isinstance(train_x, Variable):
            train_x = train_x.data
        if isinstance(train_y, Variable):
            train_y = train_y.data
        self.register_buffer("train_x", train_x)
        self.register_buffer("train_y", train_y)


    def forward(self, input, **params):
        n = len(self.train_x)

After Change


        self.gp_observation_model = gp_observation_model

        // Buffers for conditioning on data
        if train_xs is not None and train_y is not None:
            self.update_data(train_xs, train_y)

    def update_data(self, train_xs, train_y):
        if isinstance(train_xs, Variable) or isinstance(train_xs, torch._TensorBase):
            train_xs = (train_xs,)
        train_xs = [input.data if isinstance(input, Variable) else input for input in train_xs]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 5b629fe89f1fdf7dd4126135825149ff848128be
Time: 2017-06-29
Author: jrg365@cornell.edu
File Name: gpytorch/inference/posterior_models.py
Class Name: _ExactGPPosterior
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: 9c526695805c9639896b31364958d0e77bdeba62
Time: 2018-11-14
Author: gardner.jake@gmail.com
File Name: gpytorch/kernels/kernel.py
Class Name: Kernel
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: d44475866914c19f23c0f8a833951f9989250334
Time: 2018-11-17
Author: balandat@fb.com
File Name: gpytorch/kernels/kernel.py
Class Name: Kernel
Method Name: __init__