mcabbott / mcabbott/LazyStack.jl

Gradients for generators

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
29
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Despite claiming to work with Zygote, generators currently don’t work:

julia> using Zygote, LazyStack

julia> gradient(x -> sum(stack([x,x'])), rand(2,2)) # vector of arrays
([2.0 2.0; 2.0 2.0],)

julia> gradient(x -> sum(stack(x,x')), rand(2,2)) # tuple of arrays
([2.0 2.0; 2.0 2.0],)

julia> gradient(x -> sum(stack(x' for x in [x,x])), rand(2,2)) # generator
ERROR: not 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 by reproducing the generator example with Julia, LazyStack, and Zygote, comparing it with the working vector and tuple examples. Trace the generator path in LazyStack and its interaction with Zygote; done means the generator expression returns the expected gradient instead of ERROR: not yet!.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.