Flux v0.6.0: "MethodError: no method matching Flux.LSTMCell"



Flux: Version 0.6.0
Julia: Version 0.7.0

Working through flux model zoo, lang-detection/model.jl:28, and trying to update to julia7.

You can also reproduce the erorr by just Flux.LSTM(15,15) or Flux.LSTMCell(15, 15) from recurrent.jl:160

Here is the stacktrace:

MethodError: no method matching Flux.LSTMCell(::TrackedArray{…,Array{Float64,2}}, ::TrackedArray{…,Array{Float64,2}}, ::Flux.Tracker.TrackedReal{Float64}, ::TrackedArray{…,Array{Float64,1}}, ::TrackedArray{…,Array{Float64,1}})
Closest candidates are:
  Flux.LSTMCell(::A, ::A, ::V, !Matched::V, !Matched::V) where {A, V} at /Users/joshuabowles/.julia/packages/Flux/kEUDV/src/layers/recurrent.jl:116

 [1] #LSTMCell#79(::typeof(Flux.glorot_uniform), ::Type, ::Int64, ::Int64) at /Users/joshuabowles/.julia/packages/Flux/kEUDV/src/layers/recurrent.jl:125
 [2] Flux.LSTMCell(::Int64, ::Int64) at /Users/joshuabowles/.julia/packages/Flux/kEUDV/src/layers/recurrent.jl:125
 [3] #LSTM#80(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Int64, ::Vararg{Int64,N} where N) at /Users/joshuabowles/.julia/packages/Flux/kEUDV/src/layers/recurrent.jl:160
 [4] LSTM(::Int64, ::Vararg{Int64,N} where N) at /Users/joshuabowles/.julia/packages/Flux/kEUDV/src/layers/recurrent.jl:160
 [5] top-level scope at none:0

I can see the function LSTMCell was updated recently and the problem is the method here recurrent.jl:125, but other than that I don’t really know where to go from here.


It seems to be a bug and you had better open an issue at github.