import torch


def build_softmax_module(input_channels: int) -> torch.nn.Sequential:
    """
    Build softmax module for attention mechanism.

    :param input_channels: Number of input feature maps.
    :return: Sequential module.
    """
    return torch.nn.Sequential(
        torch.nn.Conv1d(in_channels=input_channels, out_channels=1, kernel_size=1),
        torch.nn.ReLU(),
        torch.nn.Softmax(dim=2)
    )