Consider the definition of the
observe statement from Probabilistic Programming, as defined in :
observestatement blocks runs which do not satisfy the boolean expression
Eand does not permit those executions to happen.
Now, consider the following theoretical program:
def f(): x ~ Normal(0, 1) observe(x > 0) # only allow samples x > 0 return x
which should return values from the truncated
Normal(0, 1) distribution.
Therefore, my question is: how can
observe be implemented in Pyro, or what’s its equivalent?
observe's argument can be any boolean expression
 Gordon, Andrew D., et al. “Probabilistic programming.” Proceedings of the on Future of Software Engineering . 2014. 167-181.