DecoderBlock¶
tiatoolbox.models.architecture.kongnet.DecoderBlock
- class DecoderBlock(in_channels, skip_channels, out_channels, attention_type='scse')[source]¶
Decoder block with upsampling, skip connection, and attention.
This block performs upsampling of the input features, concatenates with skip connections from the encoder, applies attention mechanisms, and processes through convolutions.
- Parameters:
Initialize DecoderBlock.
- Parameters:
Methods
Forward pass through decoder block.
Attributes
training- forward(x, skip=None)[source]¶
Forward pass through decoder block.
- Parameters:
x (torch.Tensor) – Input tensor to be upsampled
skip (Optional[torch.Tensor]) – Skip connection tensor from encoder. Default: None
- Returns:
Processed output tensor
- Return type: