Skip to content

Commit d74af94

Browse files
committed
Added flipped parameter
1 parent 1a683bc commit d74af94

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/conv.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,18 @@ if is_nnpack_available()
164164
end
165165
end
166166

167-
function conv(x, w::AbstractArray{T, N}; stride = 1, pad = 0, dilation = 1) where {T, N}
167+
function conv(x, w::AbstractArray{T, N}; stride = 1, pad = 0, dilation = 1, flipped = false) where {T, N}
168168
stride = expand(Val(N-2), stride)
169169
pad = expand(Val(N-2), pad)
170170
dilation = expand(Val(N-2), dilation)
171-
cdims = DenseConvDims(x, w; stride = stride, padding = pad, dilation = dilation)
171+
cdims = DenseConvDims(x, w; stride = stride, padding = pad, dilation = dilation, flipkernel = flipped)
172172
return conv(x, w, cdims)
173173
end
174174

175-
function depthwiseconv(x, w::AbstractArray{T, N}; stride = 1, pad = 0, dilation = 1) where {T, N}
175+
function depthwiseconv(x, w::AbstractArray{T, N}; stride = 1, pad = 0, dilation = 1, flipped = false) where {T, N}
176176
stride = expand(Val(N-2), stride)
177177
pad = expand(Val(N-2), pad)
178178
dilation = expand(Val(N-2), dilation)
179-
cdims = DepthwiseConvDims(x, w; stride = stride, padding = pad, dilation = dilation)
179+
cdims = DepthwiseConvDims(x, w; stride = stride, padding = pad, dilation = dilation, flipkernel = flipped)
180180
return depthwiseconv(x, w, cdims)
181181
end

0 commit comments

Comments
 (0)