We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406b237 commit 02ea145Copy full SHA for 02ea145
test/mcmc/hmc.jl
@@ -197,6 +197,16 @@ using Turing
197
@test_throws ErrorException sample(demo_impossible(), NUTS(), 5)
198
end
199
200
+ @testset "NUTS initial parameters" begin
201
+ @model function f()
202
+ x ~ Normal()
203
+ return 10 ~ Normal(x)
204
+ end
205
+ chn1 = sample(StableRNG(468), f(), NUTS(), 100; save_state=true)
206
+ chn2 = sample(StableRNG(468), f(), NUTS(), 10; initial_state=chn1.info.samplerstate)
207
+ @test isapprox(chn1[:x], 5.0; atol=2.0)
208
209
+
210
@testset "(partially) issue: #2095" begin
211
@model function vector_of_dirichlet((::Type{TV})=Vector{Float64}) where {TV}
212
xs = Vector{TV}(undef, 2)
0 commit comments