Hi, this is the error:
ERROR: MethodError: no method matching (::Dense{typeof(relu), Matrix{Float32}, Vector{Float32}})(::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
Closest candidates are:
(::Dense)(::AbstractVecOrMat)
@ Flux ~/.julia/packages/Flux/EHgZm/src/layers/basic.jl:170
(::Dense)(::AbstractArray)
@ Flux ~/.julia/packages/Flux/EHgZm/src/layers/basic.jl:177
Stacktrace:
[1] macro expansion
@ ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:101 [inlined]
[2] _pullback(ctx::Zygote.Context{false}, f::Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, args::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:101
[3] macro expansion
@ ~/.julia/packages/Flux/EHgZm/src/layers/basic.jl:53 [inlined]
[4] _pullback
@ ~/.julia/packages/Flux/EHgZm/src/layers/basic.jl:53 [inlined]
[5] _pullback(::Zygote.Context{false}, ::typeof(Flux._applychain), ::Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}, ::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:0
[6] _pullback
@ ~/.julia/packages/Flux/EHgZm/src/layers/basic.jl:51 [inlined]
[7] _pullback(ctx::Zygote.Context{false}, f::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}}, args::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:0
[8] _pullback
@ ~/Documents/Julia/Julia/Pruebas.jl:25 [inlined]
[9] _pullback(::Zygote.Context{false}, ::typeof(loss), ::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}}, ::Matrix{Float32})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:0
[10] _apply
@ ./boot.jl:838 [inlined]
[11] adjoint
@ ~/.julia/packages/Zygote/HTsWj/src/lib/lib.jl:203 [inlined]
[12] _pullback
@ ~/.julia/packages/ZygoteRules/OgCVT/src/adjoint.jl:66 [inlined]
[13] _pullback
@ ~/.julia/packages/Flux/EHgZm/src/train.jl:107 [inlined]
[14] _pullback(ctx::Zygote.Context{false}, f::Flux.Train.var"#4#5"{typeof(loss), Tuple{Matrix{Float32}}}, args::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface2.jl:0
[15] pullback(f::Function, cx::Zygote.Context{false}, args::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface.jl:44
[16] pullback
@ ~/.julia/packages/Zygote/HTsWj/src/compiler/interface.jl:42 [inlined]
[17] withgradient(f::Function, args::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}})
@ Zygote ~/.julia/packages/Zygote/HTsWj/src/compiler/interface.jl:132
[18] macro expansion
@ ~/.julia/packages/Flux/EHgZm/src/train.jl:107 [inlined]
[19] macro expansion
@ ~/.julia/packages/ProgressLogging/6KXlp/src/ProgressLogging.jl:328 [inlined]
[20] train!(loss::Function, model::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}}, data::Vector{AbstractMatrix}, opt::NamedTuple{(:layers,), Tuple{Tuple{NamedTuple{(:weight, :bias, :σ), Tuple{Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Matrix{Float32}, Matrix{Float32}, Tuple{Float64, Float64}}}, Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Vector{Float32}, Vector{Float32}, Tuple{Float64, Float64}}}, Tuple{}}}, NamedTuple{(:weight, :bias, :σ), Tuple{Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Matrix{Float32}, Matrix{Float32}, Tuple{Float64, Float64}}}, Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Vector{Float32}, Vector{Float32}, Tuple{Float64, Float64}}}, Tuple{}}}, Tuple{}}}}; cb::Nothing)
@ Flux.Train ~/.julia/packages/Flux/EHgZm/src/train.jl:105
[21] train!(loss::Function, model::Chain{Tuple{Dense{typeof(relu), Matrix{Float32}, Vector{Float32}}, Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, typeof(softmax)}}, data::Vector{AbstractMatrix}, opt::NamedTuple{(:layers,), Tuple{Tuple{NamedTuple{(:weight, :bias, :σ), Tuple{Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Matrix{Float32}, Matrix{Float32}, Tuple{Float64, Float64}}}, Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Vector{Float32}, Vector{Float32}, Tuple{Float64, Float64}}}, Tuple{}}}, NamedTuple{(:weight, :bias, :σ), Tuple{Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Matrix{Float32}, Matrix{Float32}, Tuple{Float64, Float64}}}, Optimisers.Leaf{Optimisers.Adam{Float64}, Tuple{Vector{Float32}, Vector{Float32}, Tuple{Float64, Float64}}}, Tuple{}}}, Tuple{}}}})
@ Flux.Train ~/.julia/packages/Flux/EHgZm/src/train.jl:102
[22] top-level scope
@ ~/Documents/Julia/Julia/Pruebas.jl