Skip to content
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

reimplement value_and_pullback_function and value_and_pushforward_function #4

Open
mohamed82008 opened this issue Aug 29, 2021 · 3 comments
Labels
design Package structure and correctness question Inquiries and discussions

Comments

@mohamed82008
Copy link
Member

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.

@oxinabox
Copy link
Member

Isn't that the whole point of these functions?

Otherwise would be value_and_derivative?
Which is a different function already provided

@mohamed82008
Copy link
Member Author

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.

@mohamed82008
Copy link
Member Author

it's not a show-stopper right now as most users won't even use this function

@gdalle gdalle added design Package structure and correctness question Inquiries and discussions and removed question Inquiries and discussions labels Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Package structure and correctness question Inquiries and discussions
Projects
None yet
Development

No branches or pull requests

3 participants