niftynet.layer.convolution module¶
-
class
ConvLayer
(n_output_chns, kernel_size=3, stride=1, dilation=1, padding='SAME', with_bias=False, w_initializer=None, w_regularizer=None, b_initializer=None, b_regularizer=None, name='conv')[source]¶ Bases:
niftynet.layer.base_layer.TrainableLayer
This class defines a simple convolution with an optional bias term. Please consider
ConvolutionalLayer
if batch_norm and activation are also used.
-
class
ConvolutionalLayer
(n_output_chns, kernel_size=3, stride=1, dilation=1, padding='SAME', with_bias=False, with_bn=True, acti_func=None, preactivation=False, w_initializer=None, w_regularizer=None, b_initializer=None, b_regularizer=None, moving_decay=0.9, eps=1e-05, name='conv')[source]¶ Bases:
niftynet.layer.base_layer.TrainableLayer
This class defines a composite layer with optional components:
convolution -> batch_norm -> activation -> dropout
The b_initializer and b_regularizer are applied to the ConvLayer The w_initializer and w_regularizer are applied to the ConvLayer, the batch normalisation layer, and the activation layer (for ‘prelu’)