I worked with Julia for 5 years. Flux.jl gradient worked correctly. but in new versions I receive this error. Chain(Dense…, …) I see this error.
**MethodError: no method matching l(::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}}}, ::Int64, ::Int64)
Chain(Dense…, …) I see this error.
**MethodError: no method matching l(::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}}}, ::Int64, ::Int64)
Closest candidates are:
l(::Any)
@ Main REPL[4]:1**
Flux can’t create gradient of models which created by Chain. what can I do?
Could this be from Zygote?
Closest candidates are:
l(::Any)
@ Main REPL[4]:1**
Flux can’t create gradient of models which created by Chain. what can I do?
Could this be from Zygote?
My model is Chain(Dense(1 => 10), Dense(10 => 1)).
l is loss function.
Please show me the the correct way to create network and optimize it with Chain for network of Dense layers.
MethodError: no method matching (::Dense{typeof(identity), Matrix{Float32}, Vector{Float32}})(::Chain{Tuple{Dense{…}, Dense{…}}})
Closest candidates are:
(::Dense)(::AbstractVecOrMat)
@ Flux C:\Users\javan.julia\packages\Flux\9PibT\src\layers\basic.jl:196
(::Dense)(::AbstractArray)
@ Flux C:\Users\javan.julia\packages\Flux\9PibT\src\layers\basic.jl:202
Stacktrace:
[1] macro expansion
@ C:\Users\javan.julia\packages\Zygote\55SqB\src\compiler\interface2.jl:0 [inlined]
[2] _pullback(ctx::Zygote.Context{false}, f::Dense{typeof(identity), Matrix{…}, Vector{…}}, args::Chain{Tuple{…}})
@ Zygote C:\Users\javan.julia\packages\Zygote\55SqB\src\compiler\interface2.jl:81
