FluxML / model-zoo

Please do not feed the models
https://fluxml.ai/
Other
913 stars 333 forks source link

no method matching maxpool(::TrackedArray, ::Tuple) #153

Open cossio opened 5 years ago

cossio commented 5 years ago

On this line:

https://github.com/FluxML/model-zoo/blob/42967f6767beee4092348fd41b1af33442b75924/vision/mnist/conv.jl#L69

I get the following error:

ERROR: MethodError: no method matching maxpool(::TrackedArray{…,Array{Float32,4}}, ::Tuple{Int64,Int64})
Closest candidates are:
  maxpool(::TrackedArray, ::PoolDims; kw...) at /opt/julia-depot/packages/Tracker/RRYy6/src/lib/array.jl:446
  maxpool(::AbstractArray{xT,N}, ::PoolDims; kwargs...) where {xT, N} at /opt/julia-depot/packages/TimerOutputs/7zSea/src/TimerOutput.jl:198
Stacktrace:
 [1] (::getfield(Main, Symbol("##5#9")))(::TrackedArray{…,Array{Float32,4}}) at ./REPL[28]:4
 [2] applychain(::Tuple{getfield(Main, Symbol("##5#9")),Conv{2,2,typeof(relu),TrackedArray{…,Array{Float32,4}},TrackedArray{…,Array{Float32,1}}},getfield(Main, Symbol("##6#10")),Conv{2,2,typeof(relu),TrackedArray{…,Array{Float32,4}},TrackedArray{…,Array{Float32,1}}},getfield(Main, Symbol("##7#11")),getfield(Main, Symbol("##8#12")),Dense{typeof(identity),TrackedArray{…,Array{Float32,2}},TrackedArray{…,Array{Float32,1}}},typeof(softmax)}, ::TrackedArray{…,Array{Float32,4}}) at /opt/julia depot/packages/Flux/qXNjB/src/layers/basic.jl:31 (repeats 2 times)
 [3] (::Chain{Tuple{Conv{2,2,typeof(relu),TrackedArray{…,Array{Float32,4}},TrackedArray{…,Array{Float32,1}}},getfield(Main, Symbol("##5#9")),Conv{2,2,typeof(relu),TrackedArray{…,Array{Float32,4}},TrackedArray{…,Array{Float32,1}}},getfield(Main, Symbol("##6#10")),Conv{2,2,typeof(relu),TrackedArray{…,Array{Float32,4}},TrackedArray{…,Array{Float32,1}}},getfield(Main, Symbol("##7#11")),getfield(Main, Symbol("##8#12")),Dense{typeof(identity),TrackedArray{…,Array{Float32,2}},TrackedArray{…,Array{Float32,1}}},typeof(softmax)}})(::Array{Float32,4}) at /opt/julia-depot/packages/Flux/qXNjB/src/layers/basic.jl:33
 [4] top-level scope at none:0
cossio commented 5 years ago

I see. The issue is then that the example uses an earlier version of Flux. I'm not interested in just running the example but in learning about Flux. Do you know how I can fix this error? What's the syntax I should use now for maxpool?

cossio commented 5 years ago

Thank you!

DhairyaLGandhi commented 5 years ago

Good to be closed now?

cossio commented 5 years ago

@dhairyagandhi96 I'd wait for https://github.com/FluxML/model-zoo/pull/150 to be merged.