At the moment the HMC sampler only allows for the mass matrix of the momenta to be an (implicit) identity.
|
function sample_momenta(n::Int) |
|
Float64[random(normal, 0, 1) for _=1:n] |
|
end |
It should be straightforward to allow diagonal and dense options here to bring this HMC sampler in line with common usage?
At the moment the HMC sampler only allows for the mass matrix of the momenta to be an (implicit) identity.
Gen.jl/src/inference/hmc.jl
Lines 1 to 3 in 8f2f4cc
It should be straightforward to allow diagonal and dense options here to bring this HMC sampler in line with common usage?