xnn.cnn.models.cnn3d.Conv3dBlock#
- class xnn.cnn.models.cnn3d.Conv3dBlock(in_channels, out_channels, kernel_size=5, stride=1, padding=None, activation='relu', normalization=None, smooth_stride=True)[source]#
Bases:
ModuleOne block of the conventional CNN: convolution, low-pass stride, normalization, activation.
- Parameters:
in_channels (int) – Channels in and out.
out_channels (int) – Channels in and out.
kernel_size (int, optional) – Side of the cubic kernel, by default 5.
stride (int, optional) – Downsampling factor, by default 1.
padding (int or None, optional) – Zero padding;
Nonekeeps the grid size (kernel_size // 2).activation (str or None, optional) – Element-wise activation (
make_activation()), by default"relu";Nonefor a linear block.normalization (str or None, optional) –
"batch"inserts aBatchNorm3dafter the convolution.smooth_stride (bool, optional) – Low-pass filter before subsampling (default) instead of a strided convolution.