示例#1
0
 def model():
     x = numpyro.sample("x", dist.Normal(0.0, 1.0).expand([2]).to_event(1))
     y = numpyro.sample("y", dist.ProjectedNormal(x))
     numpyro.sample("obs", dist.Normal(y, 1), obs=jnp.array([1.0, 0.0]))
示例#2
0
 def model(concentration):
     with numpyro.plate_stack("plates", shape):
         with numpyro.plate("particles", 10000):
             numpyro.sample("x", dist.ProjectedNormal(concentration))