Skip to content

Commit 904b733

Browse files
committed
use zero in grad_conv_filter
1 parent 9033a7e commit 904b733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/conv.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function ∇conv_filter(dy::A, x::A; size = nothing, pad = 0, stride = 1, dilati
8383
if size === nothing
8484
size = wdims(Base.size(x), Base.size(dy), pad_, stride_, dilation_)
8585
end
86-
∇conv_filter!(similar(dy, size), dy, x; pad = pad, stride = stride, dilation = dilation, flipkernel=flipkernel)
86+
∇conv_filter!(zero(similar(dy, size)), dy, x; pad = pad, stride = stride, dilation = dilation, flipkernel=flipkernel)
8787
end
8888

8989
# N-D dispatch

0 commit comments

Comments
 (0)