JuliaDiff / JuliaDiff/AbstractDifferentiation.jl
Whats the reason for the derivative / gradient difference?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 138
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the AbstractDifferentiation interface around derivative and gradient on AD.AbstractBackend, then compare their scalar and vector contracts. Determine whether the proposed scalar gradient delegation preserves the existing API; done means the rationale is resolved and maintainers agree on the interface direction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100