-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken wiki example #441
Comments
In the last PR I changed the API of The reason to do this is that So now this program should be changed to below mf(vi, sampler; x=[1.5, 2.0]) = begin
_lp = zero(Real)
s, __lp = Turing.assume(sampler,
InverseGamma(2, 3),
Turing.VarName(vi, [:c_s, :s], ""),
vi)
_lp += __lp
m, __lp = Turing.assume(sampler,
Normal(0,sqrt(s)),
Turing.VarName(vi, [:c_m, :m], ""),
vi)
_lp += __lp
for i = 1:2
_lp += Turing.observe(sampler,
Normal(m, sqrt(s)),
x[i],
vi)
end
vi.logp = _lp
vi
end
mf(Turing.VarInfo(), nothing) Tested in commit 43017ad as the current master seems broken? |
Makes sense, thanks for the quick response. |
The following example from the wiki
throws the following error:
The culprit appears to be that
s
is a tuple rather than aFloat64
. What is the appropriate work around? This example worked a couple of weeks ago; what changes to the internals have occurred to cause this problem?The text was updated successfully, but these errors were encountered: