public
conv_bn
— function
conv_bn(kernelsize, inplanes, outplanes, activation = relu;
rev = false, preact = true,
stride = 1, pad = 0, dilation = 1, groups = 1, [bias, weight, init],
initβ = Flux.zeros32, initγ = Flux.ones32, ϵ = 1f-5, momentum = 1f-1)
Create a convolution + batch normalization pair with activation.
Arguments
kernelsize
: size of the convolution kernel (tuple)inplanes
: number of input feature mapsoutplanes
: number of output feature mapsactivation
: the activation function for the final layerrev
: set totrue
to place the batch norm before the convolutionpreact
: set totrue
to place the activation function before the batch norm (only compatible withrev = false
)stride
: stride of the convolution kernelpad
: padding of the convolution kerneldilation
: dilation of the convolution kernelgroups
: groups for the convolution kernelbias
,weight
,init
: initialization for the convolution kernel (seeFlux.Conv
)initβ
,initγ
: initialization for the batch norm (seeFlux.BatchNorm
)ϵ
,momentum
: batch norm parameters (seeFlux.BatchNorm
)