def __init__(self,
                 dim: int,
                 inner_channels: int = 256,
                 group_size: int = 256, 
                 norm_type: str = 'scalenorm',
                 ):
        """
        Initializes the Gated_FSMN_Block_Dilated module.
        
        Args:
            dim (int): The number of input channels (features).
            inner_channels (int): The number of channels in the inner layers.
            group_size (int): Size of the groups for normalization.
            norm_type (str): Type of normalization to use ('scalenorm' or 'layernorm').
        """
        super(Gated_FSMN_Block_Dilated, self).__init__()

        # Set normalization class based on the specified type
        if norm_type == 'scalenorm':
            norm_klass = ScaleNorm  # Use ScaleNorm
        elif norm_type == 'layernorm':
            norm_klass = nn.LayerNorm  # Use LayerNorm

        self.group_size = group_size

        # Initial convolution layer with PReLU activation
        self.conv1 = nn.Sequential(
            nn.Conv1d(dim, inner_channels, kernel_size=1),
            nn.PReLU(),
        )
        
        self.norm1 = CLayerNorm(inner_channels)  # First normalization layer
        
        # Gated FSMN block with dilated convolutions
        self.gated_fsmn = Gated_FSMN_dilated(inner_channels, inner_channels, lorder=20, hidden_size=inner_channels)
        
        self.norm2 = CLayerNorm(inner_channels)  # Second normalization layer
        self.conv2 = nn.Conv1d(inner_channels, dim, kernel_size=1)  # Output convolution layer

        Initializes the Gated_FSMN_Block_Dilated module.
        
        Args:
            dim (int): The number of input channels (features).
            inner_channels (int): The number of channels in the inner layers.
            group_size (int): Size of the groups for normalization.
            norm_type (str): Type of normalization to use ('scalenorm' or 'layernorm').
        
clearvoice/clearvoice/models/mossformer2_ss/mossformer2_block.py