-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internals of the incomplete gamma function does not work with ForwardDiff.jl
's Dual()
type due to enforced floating point precision
#465
Comments
ForwardDiff.jl
's Dual()
type due to enforced floating point precision ForwardDiff.jl
's Dual()
type due to enforced floating point precision
Most special functions are only implemented in a particular precision, so you can't plug in arbitrary numeric types and expect them to work. In principle, it should be possible to make some such methods work with a type like |
Just to chime in, some of these methods do work with Zygote.jl, I had some provable success using it with Maybe Enzyme.jl will solve these issues, but I'm not sure. However, at the time of writing, I can't even get gradients on Gamma cdfs with it. |
@Deduction42 Thank you for the comment! It is great to know that you can still work it out in Zygote.jl. Would you mind providing a small MWE of how you made it work? I think it will be useful to me and people who stumble upon the issue in the future. |
I used this.
It's actually the first time autodiff has worked for me (last time I tried was three years ago) on this. I tend to run into Bayesian inference and maximum-likelihood estimates on Gamma and Beta distributions from time to time. Zygote has come a long way, and Enzyme is supposed to be even better when it fully arrives. |
I'm trying to run sensitivity analysis using
Fortuna.jl
in the example shown here:The example fails to run due to the fact that internals of the incomplete gamma function, such as
__gamma_inc_inv()
, enforceFloat64
type and, as the result, errors onForwardDiff.jl
'sDual()
type. Here a truncated error message:The text was updated successfully, but these errors were encountered: