Turing.jl 中的模型似乎陷入了错误
Warning: The current proposal will be rejected due to numerical error(s).
│ isfinite.((θ, r, ℓπ, ℓκ)) = (true, false, false, false)
适用于 NUTS()
、HMCDA()
以及有时 HMC()
采样方法。我不太明白是什么导致了这些错误(什么是θ
?),但它使得 NUTS 和 HMCDA 无法用作采样方法,而 HMC 约有 2/3 的样本被拒绝。我在这里和论坛上查看了类似的问题,但到目前为止似乎没有人能解决这个问题。
最佳答案
来自 AdvancedHMC GitHub https://github.com/TuringLang/AdvancedHMC.jl/blob/beeb37b418992a3280fc3e59d01d2a124639507e/src/hamiltonian.jl
θ::T # Position variables / model parameters.
r::T # Momentum variables
ℓπ::V # Cached neg potential energy for the current θ.
ℓκ::V # Cached neg kinect energy for the current r.
关于julia - Turing.jl 估计器显示提案将因数值错误而被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74319862/