You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like condition breaks with variables declared via NamedDist:
@modelfunctiontestmodel()
x ~NamedDist(Normal(0,1), :z)
return x
end
conditioned_model = Turing.condition(testmodel(), z=1.0)
@assertconditioned_model() ≈1.0# fails, since z is still sampled
Tested on Turing v.0.20.1
The text was updated successfully, but these errors were encountered:
This PR adds a method called `resolve_varnames(varname, dist)` and adds an additional generated variable for each `~` which now holds the RHS of `~`.
It does address #371 but uncertain if this is the best way, so wouldn't recommend merging this just yet. But putting it here so we can colab on it.
Co-authored-by: Hong Ge <[email protected]>
It looks like
condition
breaks with variables declared viaNamedDist
:Tested on Turing v.0.20.1
The text was updated successfully, but these errors were encountered: