Skip to content

Get a error when calculating the gradient for LSTM  #213

Closed as not planned
Closed as not planned

Description

@Chengfeng-Jia

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}}...

Activity

  1. devmotion commented on Sep 22, 2026

    @devmotion
    Member

    Closing since there's not much I can do without a reproducer. Please reopen with an example if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions