Skip to content

Commit 7390d5b

Browse files
chore: apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 12d0a04 commit 7390d5b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/nn/nnlib.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,15 @@ end
7878
end
7979

8080
@testset "conv 1d: flip" begin
81-
x = [1; 2; 3;;;]
82-
W = [1; 2; 3;;;]
83-
81+
x = [1.0f0; 2.0f0; 3.0f0;;;]
82+
W = [1.0f0; 2.0f0; 3.0f0;;;]
8483
xx = Reactant.ConcreteRArray(x)
8584
WW = Reactant.ConcreteRArray(W)
86-
8785
conv_noflip(x, W) = NNlib.conv(x, W; pad=1, flipped=true)
8886
conv_flip(x, W) = NNlib.conv(x, W; pad=1, flipped=false)
89-
9087
@test Reactant.compile(conv_noflip, (xx, WW))(xx, WW) ==
91-
[0*1+1*2+2*3; 1*1+2*2+3*3; 1*2+2*3+3*0;;;]
88+
[0*1+1*2+2*3; 1*1+2*2+3*3; 1*2+2*3+3*0;;;]
9289
@test Reactant.compile(conv_flip, (xx, WW))(xx, WW) ==
93-
[3*0+2*1+1*2; 3*1+2*2+1*3; 3*2+2*3+1*0;;;]
90+
[3*0+2*1+1*2; 3*1+2*2+1*3; 3*2+2*3+1*0;;;]
9491
end
9592
end

0 commit comments

Comments
 (0)