This commit is contained in:
ayush-1506 2019-05-14 02:53:48 -07:00
parent f263f0c8ed
commit bfc5bb0079
1 changed files with 0 additions and 19 deletions

View File

@ -101,23 +101,4 @@ end
randn(Float32, 10,10,1,1) |> Conv((6,1), 1=>1, Flux.σ)
true
end
@testset "CrossCor" begin
x = rand(Float32, 28, 28, 1, 1)
w = rand(2,2,1,1)
y = CrossCor(w, [0.0])
x_pred = y(x)
@test sum(w .* x[1:2, 1:2, :, :]) == x_pred[1, 1, 1, 1]
r = zeros(Float32, 28, 28, 1, 5)
m = Chain(
CrossCor((2, 2), 1=>16, relu),
MaxPool((2,2)),
CrossCor((2, 2), 16=>8, relu),
MaxPool((2,2)),
x -> reshape(x, :, size(x, 4)),
Dense(288, 10), softmax)
@test size(m(r)) == (10, 5)
end