JuliaDiff / JuliaDiff/ChainRulesCore.jl
A trait-based system to handle Wirtinger derivatives
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 267
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
While writing ForwardDiff2.jl I have encountered a problem with nested differentiation with the Wirtinger derivative.
Say if I have
x = Dual(Dual(1+1im, 1+0im), 1+0im)
how can I make hypot(value(x)) dispatch to the right place if there is
@scalar_rule(hypot(x::Real), sign(x))
@scalar_rule(hypot(x::Complex), Wirtinger(x' / 2Ω, x / 2Ω))
Neither Dual <: Number or Dual <: Real would work.
Maybe we need to have a trait-based system to handle Wirtinger derivatives?
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 with the nested Dual example and the referenced ChainRules.jl src/rulesets/Base/base.jl lines 59-60, then compare the Real and Complex hypot rules shown here. The issue does not define a specific acceptance criterion, so a useful outcome would first be a concrete, validated direction for handling the dispatch ambiguity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100