JuliaDiff / JuliaDiff/ReverseDiff.jl

Get a error when calculating the gradient for LSTM

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
393
Forks
60
Avg merge
18h 24m
Merged PRs (30d)
8

Description

Hi, I build a network. ReverseDiff.gradient works well for Dense layer. However, when I changed to a LSTM ReverseDiff.gradient(loss_mean, params), it throw an error, MethodError: no method matching (::Flux.LSTMCell{ReverseDiff.TrackedArray{Float64, Float64, 2, Matrix{Float64}, Matrix{Float64}}, ReverseDiff.TrackedArray{Float64, Float64, 2, Matrix{Float64}, Matrix{Float64}}...

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

Reproduce the reported call using ReverseDiff.gradient(loss_mean, params) with a Flux LSTM rather than a Dense layer. Start from the Flux.LSTMCell MethodError and compare the failing LSTM case with the working Dense case. Done means calculating the LSTM gradient without this MethodError.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.