UnetEncoder¶
tiatoolbox.models.architecture.unet.UnetEncoder
- class UnetEncoder(num_input_channels, layer_output_channels)[source]¶
Construct a basic unet encoder.
This class builds a basic unet encoder with batch normalization. The number of channels in each down-sampling block and the number of down-sampling levels are customisable.
- Parameters
- Returns
a pytorch model.
- Return type
model (torch.nn.Module)
Methods
Logic for using layers defined in init.
Attributes
- forward(x)[source]¶
Logic for using layers defined in init.
This method defines how layers are used in forward operation.
- Parameters
x (torch.Tensor) – Input images- the tensor is of the shape NCHW.
- Returns
- List of features for each down-sample
block. Each feature tensor is of the shape NCHW.
- Return type
features (list)