@@ -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
@@ -333,10 +331,8 @@ ChainRulesCore.@non_differentiable conv_transpose_dims(::Any, ::Any)
333
331
334
332
function (c:: ConvTranspose )(x:: AbstractArray )
335
333
_size_check (c, x, ndims (x)- 1 => _channels_in (c))
336
- # σ = NNlib.fast_act(c.σ, x)
337
334
cdims = conv_transpose_dims (c, x)
338
335
xT = _match_eltype (c, x)
339
- # σ.(∇conv_data(xT, c.weight, cdims) .+ conv_reshape_bias(c))
340
336
NNlib. bias_act! (c. σ, ∇conv_data (xT, c. weight, cdims), conv_reshape_bias (c))
341
337
end
342
338
@@ -476,10 +472,8 @@ ChainRulesCore.@non_differentiable crosscor_dims(::Any, ::Any)
476
472
477
473
function (c:: CrossCor )(x:: AbstractArray )
478
474
_size_check (c, x, ndims (x)- 1 => _channels_in (c))
479
- # σ = NNlib.fast_act(c.σ, x)
480
475
cdims = crosscor_dims (c, x)
481
476
xT = _match_eltype (c, x)
482
- # σ.(crosscor(xT, c.weight, cdims) .+ conv_reshape_bias(c))
483
477
NNlib. bias_act! (c. σ, crosscor (xT, c. weight, cdims), conv_reshape_bias (c))
484
478
end
485
479
0 commit comments