-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colab - MethodError: no method matching (::Flux.LSTMCell{... #1563
Comments
You might want to wrap the input in an array |
using Flux
LSTM(5,5)([rand(5)]) ERROR: MethodError: no method matching (::Flux.LSTMCell{Matrix{Float32}, Vector{Float32}, Tuple{Matrix{Float32}, Matrix{Float32}}})(::Tuple{Matrix{Float32}, Matrix{Float32}}, ::Vector{Vector{Float64}})
Closest candidates are:
(::Flux.LSTMCell{A, V, var"#s262"} where var"#s262"<:Tuple{AbstractMatrix{T}, AbstractMatrix{T}})(::Any, ::Union{AbstractVector{T}, AbstractMatrix{T}, Flux.OneHotArray}) where {A, V, T} at /root/.julia/packages/Flux/qp1gc/src/layers/recurrent.jl:137
Stacktrace:
[1] (::Flux.Recur{Flux.LSTMCell{Matrix{Float32}, Vector{Float32}, Tuple{Matrix{Float32}, Matrix{Float32}}}, Tuple{Matrix{Float32}, Matrix{Float32}}})(x::Vector{Vector{Float64}})
@ Flux ~/.julia/packages/Flux/qp1gc/src/layers/recurrent.jl:34
[2] top-level scope
@ none:1 |
Try |
That works, thanks darsnack! I'm not sure why Julia 1.5.3 on my laptop can run Oh well. Thanks! |
Probably your laptop has an older version of Flux where we passively allowed the type promotion. The restriction was only put in with Flux v0.12. |
When I run this, I get an error.
This occurs on a Google Colab instance. To reproduce, paste the following into a Colab cell and run:
The text was updated successfully, but these errors were encountered: