@@ -391,25 +391,25 @@ end
391391# ####
392392
393393"""
394- gen_∂logπ∂θ(vi::VarInfo , spl::Sampler, model)
394+ gen_∂logπ∂θ(vi, spl::Sampler, model)
395395
396396Generate a function that takes a vector of reals `θ` and compute the logpdf and
397397gradient at `θ` for the model specified by `(vi, spl, model)`.
398398"""
399- function gen_∂logπ∂θ (vi:: VarInfo , spl:: Sampler , model)
399+ function gen_∂logπ∂θ (vi, spl:: Sampler , model)
400400 function ∂logπ∂θ (x)
401401 return gradient_logp (x, vi, model, spl)
402402 end
403403 return ∂logπ∂θ
404404end
405405
406406"""
407- gen_logπ(vi::VarInfo , spl::Sampler, model)
407+ gen_logπ(vi, spl::Sampler, model)
408408
409409Generate a function that takes `θ` and returns logpdf at `θ` for the model specified by
410410`(vi, spl, model)`.
411411"""
412- function gen_logπ (vi:: VarInfo , spl:: Sampler , model)
412+ function gen_logπ (vi, spl:: Sampler , model)
413413 function logπ (x):: Float64
414414 x_old, lj_old = vi[spl], getlogp (vi)
415415 vi[spl] = x
@@ -437,7 +437,7 @@ function DynamicPPL.assume(
437437 spl:: Sampler{<:Hamiltonian} ,
438438 dist:: Distribution ,
439439 vn:: VarName ,
440- vi:: VarInfo
440+ vi,
441441)
442442 Turing. DEBUG && _debug (" assuming..." )
443443 updategid! (vi, vn, spl)
@@ -455,7 +455,7 @@ function DynamicPPL.dot_assume(
455455 dist:: MultivariateDistribution ,
456456 vns:: AbstractArray{<:VarName} ,
457457 var:: AbstractMatrix ,
458- vi:: VarInfo ,
458+ vi,
459459)
460460 @assert length (dist) == size (var, 1 )
461461 updategid! .(Ref (vi), vns, Ref (spl))
@@ -468,7 +468,7 @@ function DynamicPPL.dot_assume(
468468 dists:: Union{Distribution, AbstractArray{<:Distribution}} ,
469469 vns:: AbstractArray{<:VarName} ,
470470 var:: AbstractArray ,
471- vi:: VarInfo ,
471+ vi,
472472)
473473 updategid! .(Ref (vi), vns, Ref (spl))
474474 r = reshape (vi[vec (vns)], size (var))
@@ -480,7 +480,7 @@ function DynamicPPL.observe(
480480 spl:: Sampler{<:Hamiltonian} ,
481481 d:: Distribution ,
482482 value,
483- vi:: VarInfo ,
483+ vi,
484484)
485485 return DynamicPPL. observe (SampleFromPrior (), d, value, vi)
486486end
@@ -489,7 +489,7 @@ function DynamicPPL.dot_observe(
489489 spl:: Sampler{<:Hamiltonian} ,
490490 ds:: Union{Distribution, AbstractArray{<:Distribution}} ,
491491 value:: AbstractArray ,
492- vi:: VarInfo ,
492+ vi,
493493)
494494 return DynamicPPL. dot_observe (SampleFromPrior (), ds, value, vi)
495495end
0 commit comments