src.model.multiscale_cnn module

src.model.multiscale_cnn module#

class src.model.multiscale_cnn.MultiScaleCNN(*args: Any, **kwargs: Any)[source]#

Bases: Module

Multi-scale convolutional neural network module.

Uses convolution layers with different kernel sizes (3x3, 5x5) and dilation rates in parallel to capture map information at multiple scales, from local detail to larger structure.

__init__(args)[source]#
Parameters:

args (Namespace) – Configuration parameters containing: - map_feature_dim (int): Number of input feature channels. - model_dim (int): Number of output feature channels.

forward(x)[source]#
Parameters:

x (torch.Tensor) – Input feature map. Shape: (batch_size, in_channels, height, width)

Returns:

Output after fusing multi-scale features.

Shape: (batch_size, out_channels, height, width)

Return type:

torch.Tensor