Skip to content
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

MethodError: no method matching maxpool(::Array{Float32,4}, ::Tuple{Int64,Int64}) #44

Closed
barcoyou opened this issue May 23, 2019 · 3 comments

Comments

@barcoyou
Copy link

When running the test, GoogleNet() model, all get this error.

Here is the runtest result:

basic Model Tests: Error During Test at /home/dsd/Downloads/Metalhead.jl/test/runtests.jl:4
Got exception outside of a @test
MethodError: no method matching maxpool(::Array{Float32,4}, ::Tuple{Int64,Int64})
Closest candidates are:
maxpool(::AbstractArray{xT,N}, !Matched::NNlib.PoolDims; kwargs...) where {xT, N} at /home/dsd/.julia/packages/TimerOutputs/7zSea/src/TimerOutput.jl:198
Stacktrace:
[1] (::getfield(Metalhead, Symbol("##44#50")))(::Array{Float32,4}) at /home/dsd/.julia/packages/Metalhead/4zI8b/src/vgg19.jl:6
[2] applychain(::Tuple{getfield(Metalhead, Symbol("##44#50")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##45#51")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##46#52")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##47#53")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##48#54")),getfield(Metalhead, Symbol("##49#55")),Flux.Dense{typeof(NNlib.relu),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},Flux.Dropout{Float32},Flux.Dense{typeof(NNlib.relu),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},Flux.Dropout{Float32},Flux.Dense{typeof(identity),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},typeof(NNlib.softmax)}, ::Array{Float32,4}) at /home/dsd/.julia/packages/Flux/3GyGP/src/layers/basic.jl:31 (repeats 3 times)
[3] (::Flux.Chain{Tuple{Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##44#50")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##45#51")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##46#52")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##47#53")),Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},Flux.Conv{2,2,typeof(NNlib.relu),Array{Float32,4},Array{Float32,1}},getfield(Metalhead, Symbol("##48#54")),getfield(Metalhead, Symbol("##49#55")),Flux.Dense{typeof(NNlib.relu),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},Flux.Dropout{Float32},Flux.Dense{typeof(NNlib.relu),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},Flux.Dropout{Float32},Flux.Dense{typeof(identity),LinearAlgebra.Adjoint{Float32,Array{Float32,2}},Array{Float32,1}},typeof(NNlib.softmax)}})(::Array{Float32,4}) at /home/dsd/.julia/packages/Flux/3GyGP/src/layers/basic.jl:33
[4] (::VGG19)(::Array{Float32,4}) at /home/dsd/.julia/packages/Metalhead/4zI8b/src/vgg19.jl:46
[5] top-level scope at /home/dsd/Downloads/Metalhead.jl/test/runtests.jl:14
[6] top-level scope at /home/dsd/Downloads/julia/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1113
[7] top-level scope at /home/dsd/Downloads/Metalhead.jl/test/runtests.jl:5
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1094
[10] include(::Module, ::String) at ./Base.jl:31
[11] exec_options(::Base.JLOptions) at ./client.jl:295
[12] _start() at ./client.jl:464

Test Summary: | Error Total
Basic Model Tests | 1 1
ERROR: Error while loading expression starting at /home/dsd/Downloads/Metalhead.jl/test/runtests.jl:4
caused by [exception 1]
Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken

@avik-pal
Copy link
Member

Is this the master branch? (If not install the master and run the tests)

@barcoyou
Copy link
Author

yes, I just clone it from the master branch

@barcoyou
Copy link
Author

solved!
the maxpool interface is deprecated.
Should use MaxPool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants