Skip to content

Commit 8b5b26a

Browse files
committed
Skip conv_bias_act with Flux.Zeros
1 parent 6573f65 commit 8b5b26a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/layers/conv.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function (c::Conv)(x::AbstractArray)
166166
end
167167

168168
_conv_bias_act(x, w, cdims, b, σ) = NNlib.conv_bias_act(x, w, cdims, b, σ)
169+
_conv_bias_act(x, w, cdims, ::Zeros, σ) = σ.(conv(x, w, cdims))
169170
_conv_bias_act(x::CuArray, w::CuArray, cdims, b::Zeros, σ) =
170171
_conv_bias_act(x, w, cdims, CUDA.zeros(size(b)...), σ)
171172

0 commit comments

Comments
 (0)