487ec4eacee294bf9ff630fc06db22fa19331b51,gpytorch/means/constant_mean_grad.py,ConstantMeanGrad,forward,#ConstantMeanGrad#Any#,15

Before Change



    def forward(self, input):
        mean = self.constant.squeeze().repeat(input.size(-2), input.size(-1) + 1)
        if input.ndimension() == 3:
            mean = self.constant.squeeze().repeat(input.size(0), input.size(1), input.size(2) + 1)
        else:
            mean = self.constant.squeeze().repeat(input.size(0), input.size(1) + 1)
        mean[..., :, 1:] = 0
        return mean

After Change


            self.register_prior("mean_prior", prior, "constant")

    def forward(self, input):
        batch_shape = _mul_broadcast_shape(self.batch_shape, input.shape[:-2])
        mean = self.constant.squeeze().repeat(*batch_shape, input.size(-2), input.size(-1) + 1)
        mean[..., :, 1:] = 0
        return mean
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 487ec4eacee294bf9ff630fc06db22fa19331b51
Time: 2019-04-11
Author: gpleiss@gmail.com
File Name: gpytorch/means/constant_mean_grad.py
Class Name: ConstantMeanGrad
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: d4e602e3f75b5599f08083d862205dc333a17c3e
Time: 2019-11-25
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/grid_interpolation_kernel.py
Class Name: GridInterpolationKernel
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: 5353ed4a85d28cfbf3aa78b0c177e7f6ba80b2a5
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/means/constant_mean_grad.py
Class Name: ConstantMeanGrad
Method Name: forward