8e3272c530b75a2cdf25971068cba12316400d80,pyro/ops/gaussian.py,AffineNormal,condition,#AffineNormal#Any#,261
Before Change
prec_sqrt = self.matrix / self.scale.unsqueeze(-2)
precision = prec_sqrt.matmul(prec_sqrt.transpose(-1, -2))
delta = (value - self.loc) / self.scale
info_vec = prec_sqrt.matmul(delta.unsqueeze(-1)).squeeze(-1)
log_normalizer = (-0.5 * self.loc.size(-1) * math.log(2 * math.pi)
- 0.5 * delta.pow(2).sum(-1) - self.scale.log().sum(-1))
return Gaussian(log_normalizer, info_vec, precision)
After Change
prec_sqrt = self.matrix / self.scale.unsqueeze(-2)
precision = matmul(prec_sqrt, prec_sqrt.transpose(-1, -2))
delta = (value - self.loc) / self.scale
info_vec = matvecmul(prec_sqrt, delta)
log_normalizer = (-0.5 * self.loc.size(-1) * math.log(2 * math.pi)
- 0.5 * delta.pow(2).sum(-1) - self.scale.log().sum(-1))
return Gaussian(log_normalizer, info_vec, precision)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: uber/pyro
Commit Name: 8e3272c530b75a2cdf25971068cba12316400d80
Time: 2020-02-25
Author: fehiepsi@gmail.com
File Name: pyro/ops/gaussian.py
Class Name: AffineNormal
Method Name: condition
Project Name: uber/pyro
Commit Name: 8e3272c530b75a2cdf25971068cba12316400d80
Time: 2020-02-25
Author: fehiepsi@gmail.com
File Name: pyro/ops/gaussian.py
Class Name:
Method Name: matrix_and_mvn_to_gaussian
Project Name: uber/pyro
Commit Name: 8e3272c530b75a2cdf25971068cba12316400d80
Time: 2020-02-25
Author: fehiepsi@gmail.com
File Name: pyro/ops/gaussian.py
Class Name: Gaussian
Method Name: condition