JuliaDiff / JuliaDiff/ChainRules.jl
Fixing and testing rules for functions with real and complex inputs
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 475
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
There are quite a few rules where mixing complex and real inputs will result in the cotangent of a real input being complex. I proposed in JuliaDiff/ChainRulesCore.jl#176 that the right way to do things is actually to remove the imaginary part of the cotangent for real inputs. This is actually necessary in order to verify these rules with FiniteDifferences, so in general we do not actually test these mixtures.
If we choose to adopt this standard (I think we should), then we need to identify rrules that could take a mixture of real and complex inputs and ensure that the pullback projects if necessary, then add tests to that effect.
See also #232
cc @oxinabox
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 reviewing the rrules that accept mixed real and complex inputs, then read JuliaDiff/ChainRulesCore.jl#176 and #232 for the proposed convention. Use FiniteDifferences to verify the affected rules; done means necessary pullbacks project cotangents for real inputs and tests cover these mixtures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100