Skip to content

Commit 99d07e6

Browse files
committed
another small test
1 parent 9a3aa18 commit 99d07e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/layers/conv.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ end
6666
x = rand(Float32, 28, 28, 1, 1)
6767
w = rand(2,2,1,1)
6868
y = CrossCor(w, [0.0])
69-
x_pred = y(x)
7069

71-
@test sum(w .* x[1:2, 1:2, :, :]) == x_pred[1, 1, 1, 1]
70+
@test sum(w .* x[1:2, 1:2, :, :]) == y(x)[1, 1, 1, 1]
7271

7372
r = zeros(Float32, 28, 28, 1, 5)
7473
m = Chain(
@@ -80,6 +79,8 @@ end
8079
Dense(288, 10), softmax)
8180

8281
@test size(m(r)) == (10, 5)
82+
@test y(x) != Conv(w, [0.0])(x)
83+
@test CrossCor(w[end:-1:1, end:-1:1, :, :], [0.0])(x) == Conv(w, [0.0])(x)
8384
end
8485

8586
@testset "Conv with non quadratic window #700" begin

0 commit comments

Comments
 (0)