Open denizyuret opened 4 years ago
Could 3D functions (5D tensors) please be supported?
I think they are (I have published models with 3d convolutions).
On Wed, Sep 2, 2020 at 6:30 PM andevellicus notifications@github.com wrote:
Could 3D functions (5D tensors) please be supported?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/denizyuret/Knet.jl/issues/607#issuecomment-685814175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN43JXIDUQ737VMASOXV7TSDZQKDANCNFSM4QNTUR7Q .
At the moment KnetLayers' implementation of CNNs is restricted to 2D inputs:
function Filtering{T}(;height::Integer, width::Integer, inout::Pair=1=>1,
activation::ActOrNothing=NonAct(),
winit=xavier, binit=zeros,
atype=arrtype,
opts...) where T <: Function
wsize = T===typeof(conv4) ? inout : reverse(inout)
w = param(height,width,wsize...; init=winit, atype=atype)
b = binit !== nothing ? Bias(1,1,inout[2],1; init=binit, atype=atype) : Bias(nothing)
Filtering{T}(w, b, activation; opts...)
end
In my code I just changed height and width to a tuple.
Copy of KnetLayers?