AbstractDifferentiation.jl
AbstractDifferentiation.jl copied to clipboard
reimplement `value_and_pullback_function` and `value_and_pushforward_function`
The current behavior of value_and_pullback_function
/value_and_pushforward_function
is that it returns a function which when called with the co-tangents/tangents as input returns both the function value at x
and the tangent/co-tangent. The delayed return of the value of the function is unnecessary.
Isn't that the whole point of these functions?
Otherwise would be value_and_derivative
?
Which is a different function already provided
Kind of. Currently the function returned by value_and_pullback_function
takes a single input (co-tangents) and returns the function value and the pulled back co-tangents. So the value is returned in a lazy fashion after the co-tangents are passed in which is odd.
it's not a show-stopper right now as most users won't even use this function