@@ -196,10 +196,8 @@ ChainRulesCore.@non_differentiable conv_dims(::Any, ::Any)
196
196
197
197
function (c:: Conv )(x:: AbstractArray )
198
198
_size_check (c, x, ndims (x)- 1 => _channels_in (c))
199
- # σ = NNlib.fast_act(c.σ, x)
200
199
cdims = conv_dims (c, x)
201
200
xT = _match_eltype (c, x)
202
- # σ.(conv(xT, c.weight, cdims) .+ conv_reshape_bias(c))
203
201
NNlib. bias_act! (c. σ, conv (xT, c. weight, cdims), conv_reshape_bias (c))
204
202
end
205
203
@@ -332,10 +330,8 @@ ChainRulesCore.@non_differentiable conv_transpose_dims(::Any, ::Any)
332
330
333
331
function (c:: ConvTranspose )(x:: AbstractArray )
334
332
_size_check (c, x, ndims (x)- 1 => _channels_in (c))
335
- # σ = NNlib.fast_act(c.σ, x)
336
333
cdims = conv_transpose_dims (c, x)
337
334
xT = _match_eltype (c, x)
338
- # σ.(∇conv_data(xT, c.weight, cdims) .+ conv_reshape_bias(c))
339
335
NNlib. bias_act! (c. σ, ∇conv_data (xT, c. weight, cdims), conv_reshape_bias (c))
340
336
end
341
337
@@ -475,10 +471,8 @@ ChainRulesCore.@non_differentiable crosscor_dims(::Any, ::Any)
475
471
476
472
function (c:: CrossCor )(x:: AbstractArray )
477
473
_size_check (c, x, ndims (x)- 1 => _channels_in (c))
478
- # σ = NNlib.fast_act(c.σ, x)
479
474
cdims = crosscor_dims (c, x)
480
475
xT = _match_eltype (c, x)
481
- # σ.(crosscor(xT, c.weight, cdims) .+ conv_reshape_bias(c))
482
476
NNlib. bias_act! (c. σ, crosscor (xT, c. weight, cdims), conv_reshape_bias (c))
483
477
end
484
478
0 commit comments