Created an issue #597 in funsor. I also tried using TruncatedNormal
with low=0
instead of TransformedDistribution
with ExpTransform
, but I get the same error: ValueError: Invalid shape: expected (), actual (1,)
. I have added that info the feature request as well.
Can you suggest a workaround in the meantime? As I mentioned, the sampler converges but it doesn’t produce the right values. I don’t think what I’m doing above is right.
For instance, in the model in this comment, I am setting theta_5_raw ~ normal(mu, std)
and doing theta_5 = jnp.exp(theta_5_raw)
, whereas I actually want theta_5
to be normally distributed with the same mu
and std
parameters.
Same is the case with the orderd constraint for the model in this comment.
Maybe I need to use numpyro.factor()
here to update the log pdf, ala updating the target
variable in Stan?