File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
name = " DynamicPPL"
2
2
uuid = " 366bfd00-2699-11ea-058f-f148b4cae6d8"
3
- version = " 0.22.0 "
3
+ version = " 0.22.1 "
4
4
5
5
[deps ]
6
6
AbstractMCMC = " 80f14c24-f653-4e6a-9b94-39d6b0f70001"
@@ -24,7 +24,7 @@ ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
24
24
AbstractMCMC = " 2, 3.0, 4"
25
25
AbstractPPL = " 0.5.3"
26
26
BangBang = " 0.3"
27
- Bijectors = " 0.11"
27
+ Bijectors = " 0.11, 0.12 "
28
28
ChainRulesCore = " 0.9.7, 0.10, 1"
29
29
ConstructionBase = " 1"
30
30
Distributions = " 0.23.8, 0.24, 0.25"
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
23
23
[compat ]
24
24
AbstractMCMC = " 2.1, 3.0, 4"
25
25
AbstractPPL = " 0.5.1, 0.6"
26
- Bijectors = " 0.11"
26
+ Bijectors = " 0.11, 0.12 "
27
27
Distributions = " 0.25"
28
28
DistributionsAD = " 0.6.3"
29
29
Documenter = " 0.26.1, 0.27"
@@ -33,6 +33,6 @@ MCMCChains = "4.0.4, 5"
33
33
MacroTools = " 0.5.5"
34
34
Setfield = " 0.7.1, 0.8, 1"
35
35
StableRNGs = " 1"
36
- Tracker = " 0.2.11 "
36
+ Tracker = " 0.2.23 "
37
37
Zygote = " 0.5.4, 0.6"
38
38
julia = " 1.6"
Original file line number Diff line number Diff line change @@ -13,11 +13,8 @@ function test_model_ad(model, logp_manual)
13
13
x = DynamicPPL. getall (vi)
14
14
15
15
# Log probabilities using the model.
16
- function logp_model (x)
17
- new_vi = VarInfo (vi, SampleFromPrior (), x)
18
- model (new_vi)
19
- return getlogp (new_vi)
20
- end
16
+ ℓ = DynamicPPL. LogDensityFunction (model, vi)
17
+ logp_model = Base. Fix1 (LogDensityProblems. logdensity, ℓ)
21
18
22
19
# Check that both functions return the same values.
23
20
lp = logp_manual (x)
You can’t perform that action at this time.
0 commit comments