784d00f0c38fb5fd77aed0a6dffb93cc98a0c990,gpytorch/likelihoods/gaussian_likelihood.py,GaussianLikelihood,pyro_sample_y,#GaussianLikelihood#Any#Any#Any#Any#,87
Before Change
y_dist = MultivariateNormal(y_mean, y_lazy_covar)
if len(y_dist.batch_shape):
y_dist = y_dist.__class__(
y_dist.mean.contiguous().view(-1) , BlockDiagLazyTensor(y_dist.lazy_covariance_matrix)
)
y_obs = y_obs.view_as(y_dist.mean)
pyro.sample(name_prefix + "._training_labels", y_dist, obs=y_obs)
After Change
// Samples will occur in the first batch dimension
sample_shape = y_dist.shape()[:-y_obs.dim()]
y_obs = y_obs.expand(y_dist.shape())
with pyro.poutine.scale(scale=float(1. / sample_shape.numel() )):
pyro.sample(name_prefix + "._training_labels", y_dist, obs=y_obs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: cornellius-gp/gpytorch
Commit Name: 784d00f0c38fb5fd77aed0a6dffb93cc98a0c990
Time: 2019-01-29
Author: gpleiss@gmail.com
File Name: gpytorch/likelihoods/gaussian_likelihood.py
Class Name: GaussianLikelihood
Method Name: pyro_sample_y
Project Name: pytorch/pytorch
Commit Name: d30f4d1dfd5237d89834363ce2cff9de4ee92811
Time: 2021-03-03
Author: 24860335+xwang233@users.noreply.github.com
File Name: torch/nn/modules/_functions.py
Class Name: SyncBatchNorm
Method Name: forward
Project Name: masa-su/pixyz
Commit Name: 669db4064682fd00363e50fa72572ea675789e85
Time: 2019-05-11
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/flows/operations.py
Class Name: Preprocess
Method Name: forward