@@ -190,7 +190,9 @@ function DynamicPPL.initialstep(
190
190
# Create a Hamiltonian.
191
191
metricT = getmetricT (spl. alg)
192
192
metric = metricT (length (theta))
193
- ldf = DynamicPPL. LogDensityFunction (model, vi; adtype= spl. alg. adtype)
193
+ ldf = DynamicPPL. LogDensityFunction (
194
+ model, DynamicPPL. getlogjoint, vi; adtype= spl. alg. adtype
195
+ )
194
196
lp_func = Base. Fix1 (LogDensityProblems. logdensity, ldf)
195
197
lp_grad_func = Base. Fix1 (LogDensityProblems. logdensity_and_gradient, ldf)
196
198
hamiltonian = AHMC. Hamiltonian (metric, lp_func, lp_grad_func)
296
298
297
299
function get_hamiltonian (model, spl, vi, state, n)
298
300
metric = gen_metric (n, spl, state)
299
- ldf = DynamicPPL. LogDensityFunction (model, vi; adtype= spl. alg. adtype)
301
+ ldf = DynamicPPL. LogDensityFunction (
302
+ model, DynamicPPL. getlogjoint, vi; adtype= spl. alg. adtype
303
+ )
300
304
lp_func = Base. Fix1 (LogDensityProblems. logdensity, ldf)
301
305
lp_grad_func = Base. Fix1 (LogDensityProblems. logdensity_and_gradient, ldf)
302
306
return AHMC. Hamiltonian (metric, lp_func, lp_grad_func)
0 commit comments