these are now useless

This commit is contained in:
Mike J Innes 2017-08-18 00:46:53 +01:00
parent 536949891d
commit 8869f1f953
2 changed files with 0 additions and 38 deletions

View File

@ -36,7 +36,6 @@ include("layers/affine.jl")
include("layers/activation.jl")
include("layers/cost.jl")
include("layers/recurrent.jl")
include("layers/shims.jl")
include("data.jl")
include("training.jl")

View File

@ -1,37 +0,0 @@
struct Conv2D
filter::Param{Array{Float64,4}} # [height, width, inchans, outchans]
stride::Dims{2}
end
Conv2D(size; in = 1, out = 1, stride = (1,1), init = initn) =
Conv2D(param(initn(size..., in, out)), stride)
infer(c::Conv2D, in::Dims{4}) =
(in[1], map(i -> (in[i+1]-size(c.filter,i))÷c.stride[i]+1, (1,2))..., size(c.filter, 4))
# TODO: many of these should just be functions
for Pool in :[MaxPool, AvgPool].args
@eval begin
struct $Pool
size::Dims{2}
stride::Dims{2}
end
$Pool(size; stride = (1,1)) =
$Pool(size, stride)
infer(c::$Pool, in::Dims{4}) =
(in[1], map(i -> (in[i+1]-c.size[i])÷c.stride[i]+1, (1,2))..., in[4])
shape(c::$Pool) = nothing
end
end
struct Reshape{N}
dims::Dims{N}
end
Reshape(dims::Integer...) = Reshape(dims)
shape(r::Reshape, ::Void) = r.dims