-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
besseli (and friends?) #945
Comments
The description sounds right to me. Probably the best way to solve this is to support ChainRules types internally in Zygote, as described in #603. I guess an alternative is to add an @adjoint for the function, but that moves us in the opposite direction that we want to go (i.e. more rrules, less adjoints) |
Hey I like adjoints :p |
@devmotion proposed a most short term solution yesterday. we probably want that even once we do #603 |
The Zygote issue is also discussed in #873. |
Closing in favour of #873 |
yields
Perhaps @oxinabox or @mzgubic could confirm whether the following explanation of the problem is accurate:
Zygote doesn't do thunks, so when converting between Zygote and
ChainRules types we strip out any thunks by
unthunk`ing them.At the same time, there are some rules in
ChainRules
where we don't have cotangents implemented w.r.t. certain arguments. For such arguments, we return a thunk, which throws the above error if it's ever actually used.besseli
is one such function.The thinking is that if you never actually need the gradient w.r.t. the argument whose gradient we don't know, we can avoid ever having to worry about not knowing how to compute it. Alas, unthunking to get a type that Zygote can handle means we always evaluate the thing.
Any thoughts on good resolutions?
This is going to cause problems for some
TemporalGPs.jl
work in the next couple of days. I can add a workaround for now, but that's obviously not much use for anyone else who runs into this.edit: cross-referenced relevant TemporalGPs issue.
The text was updated successfully, but these errors were encountered: