Both UnitEuclideanMetric and DiagEuclideanMetric support vectorized sampling, for example, if we have multiple chains n_chains=5, we can directly set metric = DiagEuclideanMetric((D, n_chains)) or metric = DiagEuclideanMetric((D, n_chains)) and use the vectorized routines to complete HMC sampling with these metrics, but there is no such support for DenseEuclideanMetric. While there are some comments in the code base below, which indicate this might be able to be implemented with higher-dimensional tensors, there still would be a lot of work for the current API to do this.
|
# TODO: make dense mass matrix support matrix-mode parallel |
|
function DenseEuclideanMetric( |
|
M⁻¹::Union{AbstractMatrix{T},AbstractArray{T,3}} |
|
) where {T<:AbstractFloat} |
Both
UnitEuclideanMetricandDiagEuclideanMetricsupport vectorized sampling, for example, if we have multiple chainsn_chains=5, we can directly setmetric = DiagEuclideanMetric((D, n_chains))ormetric = DiagEuclideanMetric((D, n_chains))and use the vectorized routines to complete HMC sampling with these metrics, but there is no such support forDenseEuclideanMetric. While there are some comments in the code base below, which indicate this might be able to be implemented with higher-dimensional tensors, there still would be a lot of work for the current API to do this.AdvancedHMC.jl/src/metric.jl
Lines 79 to 82 in 316e3d9