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
The new VarInfo#309 introduced many nice new features and significant performance improvements. However, it needs to be used with caution at the moment. For example, we can easily introduce spurious variables into SimpleVarInfo which does not influence logdensity evaluation, but would subtly change HMC behaviour (for good or bad). It is because the spurious variables (i.e. x[3:4]) would introduce additional momentum variables. Since these variables do not have a prior on them, the sampling results would become slightly tricky to analyse.
julia>using DynamicPPL, StableRNGs, Distributions
julia>@modelfunctiondemo()
m ~Normal()
x =Vector{Float64}(undef, 2)
for i ineachindex(x)
x[i] ~Normal()
endreturn x
end
julia> _, vi = DynamicPPL.evaluate!!(m, SimpleVarInfo((x =ones(2), )), ctx);
julia> _, vi = DynamicPPL.evaluate!!(m, SimpleVarInfo((x =ones(4), )), ctx); # Note the spurious x variables x[3:4]
julia> vi
SimpleVarInfo((x = [-1.6438528680920432, 0.7944393211208289, 1.0, 1.0], m =1.2973461452176338), -5.265062153308225)
The text was updated successfully, but these errors were encountered:
The new
VarInfo
#309 introduced many nice new features and significant performance improvements. However, it needs to be used with caution at the moment. For example, we can easily introduce spurious variables intoSimpleVarInfo
which does not influencelogdensity
evaluation, but would subtly change HMC behaviour (for good or bad). It is because the spurious variables (i.e.x[3:4]
) would introduce additional momentum variables. Since these variables do not have a prior on them, the sampling results would become slightly tricky to analyse.The text was updated successfully, but these errors were encountered: