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

Whats the reason for the derivative / gradient difference? #61

Open
marius311 opened this issue Aug 16, 2022 · 0 comments
Open

Whats the reason for the derivative / gradient difference? #61

marius311 opened this issue Aug 16, 2022 · 0 comments
Labels
design Package structure and correctness question Inquiries and discussions

Comments

@marius311
Copy link

Is there a reason to have a separate function derivative for the gradient wrt a scalar value? I find that it tends to make me have to add special cases where code would just work for both vectors and scalars if there was a definition of something like:

AD.gradient(ad::AD.AbstractBackend, f, x::Number) = AD.derivative(ad, f, x)
@gdalle gdalle added design Package structure and correctness 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

2 participants