def forward(self, input):
        """
        Forward pass through the Gated-FSMN Block.

        Args:
            input (Tensor): Input tensor of shape (batch_size, seq_len, dim).

        Returns:
            Tensor: Output tensor of shape (batch_size, seq_len, dim).
        """
        
        # Apply first 1D convolution and activation (transpose to match Conv1d format)
        conv1 = self.conv1(input.transpose(2, 1))
        
        # Normalize the output of the first convolution
        norm1 = self.norm1(conv1)
        
        # Apply the Gated FSMN block to the normalized output (transpose to match FSMN format)
        seq_out = self.gated_fsmn(norm1.transpose(2, 1))
        
        # Normalize the output of FSMN (transpose back to match Conv1d format)
        norm2 = self.norm2(seq_out.transpose(2, 1))
        
        # Apply second 1D convolution
        conv2 = self.conv2(norm2)
        
        # Add the input (skip connection) and return the result (transpose back to original format)
        return conv2.transpose(2, 1) + input

        Forward pass through the Gated-FSMN Block.

        Args:
            input (Tensor): Input tensor of shape (batch_size, seq_len, dim).

        Returns:
            Tensor: Output tensor of shape (batch_size, seq_len, dim).
        
clearvoice/clearvoice/models/mossformer2_ss/mossformer2_block.py