Last active
January 21, 2020 00:41
-
-
Save tuananhle7/8fb6f297b121d16307462f83e31d314a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyro | |
import pyro.poutine as poutine | |
def model(z): | |
pyro.sample('z', pyro.distributions.Normal(0, 1), obs=z) | |
z = 1.2 | |
# this evaluates log Normal(1.2 | 0, 1) | |
trace = poutine.trace(model).get_trace(z) | |
trace.log_prob_sum() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment