Open mashu opened 1 year ago
I think this issue should be filed with StatsFuns. The missing part is support of ForwardDiff for StatsFuns.gammalogccdf
and/or StatsFuns.poislogcdf
. These functions do not support ForwardDiff.Dual
yet. The problem is similar to https://github.com/JuliaStats/StatsFuns.jl/issues/152.
I am modeling in Turing.jl some process in which I use Gamma prior to parametrize Truncated Poisson and I use NUTs sampler.
However, my model has nested dependence and I cannot fully vectorize the loop, so Zygote would be slow. The default ForwardDiff throws at me an error
To my understanding this error suggests that the model is encountering issues with automatic differentiation, specifically when evaluating the complementary cumulative distribution function (CCDF) of the Gamma distribution. Seems like the error might be related to the Truncated Poisson distribution, as the truncation operation might involve the CCDF of the underlying distribution.
Can that be solved in ForwardDiff AD ?