Skip to content

Commit f8fe29f

Browse files
authored
Changed output size calculation to support kernel size such as (x,y)
1 parent d07ac0b commit f8fe29f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/impl/conv.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ img_size(c::ConvDims{I,K,C,S,P,D,F}) where {I, K, C, S, P, D, F} = I
1818
# Calculate the output dimensions of this convolution
1919
function output_size(c::ConvDims{I,K,C,S,P,D,F}) where {I, K, C, S, P, D, F}
2020
O_w = div(I[1] + P[1] + P[2] - (K[1] - 1) * D[1] - 1, S[1]) + 1
21-
O_h = div(I[2] + P[3] + P[4] - (K[1] - 1) * D[1] - 1, S[1]) + 1
21+
O_h = div(I[2] + P[3] + P[4] - (K[2] - 1) * D[2] - 1, S[2]) + 1
2222
return (O_w, O_h)
2323
end
2424
kernel_size(c::ConvDims{I,K,C,S,P,D,F}) where {I, K, C, S, P, D, F} = K

0 commit comments

Comments
 (0)