-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Gradient of SpecialFunctions.bessel...
errors with SpecialFunctions >= 1 - support thunks?
#873
Comments
cc @oxinabox |
Urg, yes. Without that it is a bit hard (though not impossible) to support thunks. But also SpecialFunctions should implement that gradient |
It should but the analytical expressions in e.g. JuliaDiff/ChainRules.jl#208 would require to add hypergeometric functions to SpecialFunctions, e.g., by depending on HypergeometricFunctions or new implementations in SpecialFunctions. |
This specific issue with SpecialFunctions is fixed now by using |
Recently, the ChainRules defintions for SpecialFunctions were moved from ChainRules to SpecialFunctions. During this update, also the definitions of the rules for
bessel...
were changed: previously the derivative with respect to the order was defined asNaN
whereas now it is@thunk(error("not implemented"))
. This seems correct since the derivative exists but is just not implemented (see JuliaDiff/ChainRules.jl#292 (comment) for some discussion).However, since Zygote unthunks everything when wrapping existing
rrule
s even the gradient ofSpecialFunctions.bessel...
with respect to the second argument can't be computed anymore with SpecialFunctions >= 1:whereas before (SpecialFunctions 0.10):
It seems the correct way to deal with this would be to add support for thunks to Zygote.
The text was updated successfully, but these errors were encountered: