JuliaDiff / JuliaDiff/ChainRules.jl

Rules for `eachslice` with multiple `dims`

Open
#722 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug missing rule
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.