JuliaDiff / JuliaDiff/ChainRules.jl
Rules for `eachslice` with multiple `dims`
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 475
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
With Julia 1.9 eachslice enables to properly drop dimension when taking a reduction function over some dimension (at least based on JuliaLang/julia#16606). However, having implemented this, it seems multiple dimensions is not handled yet. I stumbled upon @mcabbott advice, "the gradient rule for eachslice is unable to handle case right now, please make an issue" to fill an issue, so here it is. If I'm correct, this has not been opened yet.
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 src/rulesets/Base/indexing.jl around line 249, where the linked discussion identifies the eachslice gradient rule. Read the surrounding rule and its existing coverage, then trace how multiple dims are represented. Done means the rule handles eachslice with multiple dimensions and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100