Skip to content

Commit 9a3aa18

Browse files
committed
conflicts
2 parents 20b79e0 + 79534ca commit 9a3aa18

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

CITATION.bib

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@article{Flux.jl-2018,
2+
author = {Michael Innes and
3+
Elliot Saba and
4+
Keno Fischer and
5+
Dhairya Gandhi and
6+
Marco Concetto Rudilosso and
7+
Neethu Mariya Joy and
8+
Tejan Karmali and
9+
Avik Pal and
10+
Viral Shah},
11+
title = {Fashionable Modelling with Flux},
12+
journal = {CoRR},
13+
volume = {abs/1811.01457},
14+
year = {2018},
15+
url = {http://arxiv.org/abs/1811.01457},
16+
archivePrefix = {arXiv},
17+
eprint = {1811.01457},
18+
timestamp = {Thu, 22 Nov 2018 17:58:30 +0100},
19+
biburl = {https://dblp.org/rec/bib/journals/corr/abs-1811-01457},
20+
bibsource = {dblp computer science bibliography, https://dblp.org}
21+
}
22+
23+
@article{innes:2018,
24+
author = {Mike Innes},
25+
title = {Flux: Elegant Machine Learning with Julia},
26+
journal = {Journal of Open Source Software},
27+
year = {2018},
28+
doi = {10.21105/joss.00602},
29+
}

test/layers/conv.jl

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,30 @@ end
8080
Dense(288, 10), softmax)
8181

8282
@test size(m(r)) == (10, 5)
83-
83+
end
84+
85+
@testset "Conv with non quadratic window #700" begin
86+
data = zeros(Float32, 7,7,1,1)
87+
data[4,4,1,1] = 1
88+
89+
l = Conv((3,3), 1=>1)
90+
expected = zeros(eltype(l.weight),5,5,1,1)
91+
expected[2:end-1,2:end-1,1,1] = l.weight
92+
@test expected == l(data)
93+
94+
l = Conv((3,1), 1=>1)
95+
expected = zeros(eltype(l.weight),5,7,1,1)
96+
expected[2:end-1,4,1,1] = l.weight
97+
@test expected == l(data)
98+
99+
l = Conv((1,3), 1=>1)
100+
expected = zeros(eltype(l.weight),7,5,1,1)
101+
expected[4,2:end-1,1,1] = l.weight
102+
@test expected == l(data)
103+
104+
@test begin
105+
# we test that the next expression does not throw
106+
randn(Float32, 10,10,1,1) |> Conv((6,1), 1=>1, Flux.σ)
107+
true
108+
end
84109
end

0 commit comments

Comments
 (0)