File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ function Turing.Inference.getparams(
40
40
return state. transition. params
41
41
end
42
42
43
+ function Turing. Inference. getparams (
44
+ :: Turing.DynamicPPL.Model , state:: SliceSampling.LatentSliceState
45
+ )
46
+ return state. transition. params
47
+ end
48
+
43
49
function Turing. Inference. getlogp_external (
44
50
:: Turing.DynamicPPL.Model , t:: SliceSampling.Transition , state
45
51
)
Original file line number Diff line number Diff line change 36
36
chain_logp_check = sample (
37
37
logp_check (), externalsampler (sampler), 100 ; progress= false
38
38
)
39
- @test isapprox (logpdf .(Normal (), chain_logp_check[:x ]), chain_logp_check[:logp ])
39
+ @test isapprox (logpdf .(Normal (), chain_logp_check[:x ]), chain_logp_check[:lp ])
40
40
end
41
41
42
42
@testset " gibbs($sampler )" for sampler in [
57
57
chain_logp_check = sample (
58
58
logp_check (), Turing. Gibbs (:x => externalsampler (sampler)), 100 ; progress= false
59
59
)
60
- @test isapprox (logpdf .(Normal (), chain_logp_check[:x ]), chain_logp_check[:logp ])
60
+ @test isapprox (logpdf .(Normal (), chain_logp_check[:x ]), chain_logp_check[:lp ])
61
61
end
62
62
end
You can’t perform that action at this time.
0 commit comments