napari_cellseg3d.code_models.models.unet.buildingblocks#
Functions
|
|
|
Create a list of modules with together constitute a single conv layer with non-linearity and optional batchnorm/groupnorm. |
|
|
|
Classes
|
Abstract class for upsampling. |
|
A single module for decoder path consisting of the upsampling layer (either learned ConvTranspose3d or nearest neighbor interpolation) followed by a basic module (DoubleConv or ExtResNetBlock). |
|
A module consisting of two consecutive convolution layers (e.g. BatchNorm3d+ReLU+Conv3d). |
|
A single module from the encoder path consisting of the optional max pooling layer (one may specify the MaxPool kernel_size to be different than the standard (2,2,2), e.g. if the volumetric data is anisotropic (make sure to use complementary scale_factor in the decoder path) followed by a DoubleConv module. |
|
Basic UNet block consisting of a SingleConv followed by the residual block. |
|
Args: mode (str): algorithm used for upsampling: 'nearest' | 'linear' | 'bilinear' | 'trilinear' | 'area'. Default: 'nearest' used only if transposed_conv is False. |
|
Initialize internal Module state, shared by both nn.Module and ScriptModule. |
|
Basic convolutional module consisting of a Conv3d, non-linearity and optional batchnorm/groupnorm. |
|
Args: in_channels (int): number of input channels for transposed conv used only if transposed_conv is True out_channels (int): number of output channels for transpose conv used only if transposed_conv is True kernel_size (int or tuple): size of the convolving kernel used only if transposed_conv is True scale_factor (int or tuple): stride of the convolution used only if transposed_conv is True. |