Skip to content

Commit 1940455

Browse files
authored
Merge pull request #89 from KristofferC/patch-1
fix bug thingy in maxpool
2 parents 9734df6 + c2e884c commit 1940455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/impl/pool.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function max_pooling2d_fwd!(x::AbstractArray{T,4}, y::AbstractArray{T,4},
1313

1414
m = typemin(T)
1515
for j in hstart:hend, i in wstart:wend
16-
m = max(x[i, j, c, n])
16+
m = max(m, x[i, j, c, n])
1717
end
1818
y[pw, ph, c, n] = m
1919
end
@@ -155,7 +155,7 @@ function max_pooling3d_fwd!(x::AbstractArray{T,5}, y::AbstractArray{T,5},
155155

156156
m = typemin(T)
157157
for k in dstart:dend, j in hstart:hend, i in wstart:wend
158-
m = max(x[i, j, k, c, n])
158+
m = max(m, x[i, j, k, c, n])
159159
end
160160
y[pw, ph, pd, c, n] = m
161161
end

0 commit comments

Comments
 (0)