5353ed4a85d28cfbf3aa78b0c177e7f6ba80b2a5,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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
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
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: 5353ed4a85d28cfbf3aa78b0c177e7f6ba80b2a5
Time: 2019-04-12
Author: gpleiss@gmail.com
File Name: gpytorch/means/constant_mean_grad.py
Class Name: ConstantMeanGrad
Method Name: forward
Project Name: pytorch/fairseq
Commit Name: 4fed0beca64a52aa718371dc3b2cf1fd979197a4
Time: 2021-02-10
Author: patrick.v.platen@gmail.com
File Name: fairseq/models/wav2vec/wav2vec2.py
Class Name: Wav2Vec2Model
Method Name: forward