-
Notifications
You must be signed in to change notification settings - Fork 62
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
Explicit Rules for Higher Order "Adjoints" #67
Comments
Hmmm I don't think that we currently have that interface. I would be very interested to know what you think it should look like though, preferably with reference to the existing API. |
Big re-organization
So I think I worked out the API this should have. We don't take |
@oxinabox this is exactly what we've done with |
Originally posted by @shashi in #74 (comment) It turns out we need change #88 to be of the form: res = frule(f, x..., partials...)
if res !== nothing
fx, pushforward = res
partials = pushforward(Zero(), partials...)
end We're starting to think about Taylor mode FD where we need to differentiate through pushforward. If we don't have pushforward as a separate function, then we'd have to differentiate a call to |
I don't think thats right. Though I suspect for most Or perhaps that we would like to get using symbolic AD. |
Paraphrasing the second part of my post in #102 (comment) We can't generate higher order Because all functions we want to write The
So naive attempts at using AD to generate the rules via recursive call will fail to put us in a position to easily reuse the values. |
@jessebett I am leaning towards us leaving That way in taylor mode you either hit good |
Can the API for adding an adjoint rule allow for explicitly specifying the rule for a higher order adjoint?
e.g.
D(sin,x) = v -> v * cos(x)
but I also know thatD(sin,x; n=2) = (v1,v2) -> v2*v1*(- sin(x))
The text was updated successfully, but these errors were encountered: