Skip to content

Commit 303c900

Browse files
committed
Fix asymmetric padding arguments to NNPACK's conv()
1 parent 9cfd08a commit 303c900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nnpack/libnnpack.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ end
127127
function nnp_convolution_output(y::Array{Float32,4}, x::Array{Float32,4}, w::Array{Float32,4}, b::Array{Float32,1}; algo::nnp_convolution_algorithm = UInt32(0), workspace_buffer = nothing, workspace_size = 0, padding = 0, stride = 1, threadpool = C_NULL, profile = nothing)
128128
input_size = nnp_size(Csize_t.((size(x,1), size(x,2)))...)
129129
kernel_size = nnp_size(Csize_t.((size(w,1),size(w,2)))...)
130-
input_padding = nnp_padding(Csize_t(padding[2]), Csize_t(padding[1]), Csize_t(padding[2]), Csize_t(padding[1]))
130+
input_padding = nnp_padding(Csize_t(padding[3]), Csize_t(padding[2]), Csize_t(padding[4]), Csize_t(padding[1]))
131131
profile = profile == nothing ? nnp_profile() : profile
132132
workspace_buffer = workspace_buffer === nothing ? C_NULL : workspace_buffer
133133
nnp_convolution_output(UInt32(algo), size(x,4), size(x,3), size(w,4), input_size, input_padding, kernel_size, x, w, b, y, workspace_buffer, workspace_size, UInt32(0), C_NULL, threadpool, profile)

0 commit comments

Comments
 (0)