Pool(w) cannot deal 5 dims data

question
package

#1

julia>using Knet
julia> dims=(3, 3, 3, 1, 64)
(3, 3, 3, 1, 64)

julia> w=gaussian(dims)
3×3×3×1×64 Array{Float64,5}:

julia> pool(w)
ERROR: MethodError: no method matching pool(::Array{Float64,5})
Closest candidates are:
pool(::Array{Float64,4}; window, padding, stride, mode, maxpoolingNanOpt, alpha, handle) at /home/users/xdlan/.julia/packages/Knet/rKugL/src/conv.jl:526
pool(::Array{Float32,4}; window, padding, stride, mode, maxpoolingNanOpt, alpha, handle) at /home/users/xdlan/.julia/packages/Knet/rKugL/src/conv.jl:526
pool(::KnetArray{T,N} where N; handle, alpha, o…) where T at /home/users/xdlan/.julia/packages/Knet/rKugL/src/conv.jl:127

Stacktrace:
[1] top-level scope at none:0


#2

>?pool does say it supports up to dims=5 for float64, float32

dropping the fourth dimension and running pool(w) gives a different but possibly related error, lib not defined

Ah, KnetArrays with dims = 4 or 5 are supported, try

w2 = KnetArrays(w);
pool(w2);

Doesn’t work locally for lack of a discrete gpu


#3

thank you, i have solved it. The tutor helps a lot.