def forward(self, input: torch.Tensor) -> torch.Tensor:
        """
        Forward pass through the Gated FSMN block.
        
        Args:
            input (torch.Tensor): Input tensor of shape (batch_size, seq_length, dim).
        
        Returns:
            torch.Tensor: Output tensor after processing through the Gated FSMN block.
        """
        # Apply the first convolution and transpose for correct dimensions
        conv1 = self.conv1(input.transpose(2, 1))
        norm1 = self.norm1(conv1)  # Apply normalization after first convolution
        
        # Process through the gated FSMN and transpose back to original dimensions
        seq_out = self.gated_fsmn(norm1.transpose(2, 1))
        norm2 = self.norm2(seq_out.transpose(2, 1))  # Apply normalization after gated FSMN
        
        # Apply the second convolution and return the residual connection
        conv2 = self.conv2(norm2)  # Final convolution
        return conv2.transpose(2, 1) + input  # Return output with residual connection

        Forward pass through the Gated FSMN block.
        
        Args:
            input (torch.Tensor): Input tensor of shape (batch_size, seq_length, dim).
        
        Returns:
            torch.Tensor: Output tensor after processing through the Gated FSMN block.
        
clearvoice/clearvoice/models/mossformer2_ss/mossformer2_block.py