def forward(self, x):
        """
        Forward pass for the Gated_FSMN block.

        Args:
            x (Tensor): Input tensor of shape (batch, sequence length, in_channels).

        Returns:
            Tensor: Output tensor after applying gated FSMN and feedforward operations.
        """
        input = x  # Save original input for skip connection

        # Process input through FFConvM for both 'u' and 'v' branches
        x_u = self.to_u(x)
        x_v = self.to_v(x)

        # Apply FSMN to the 'u' branch
        x_u = self.fsmn(x_u)

        # Gated interaction between 'u' and 'v' branches, followed by skip connection
        x = x_v * x_u + input
        return x

        Forward pass for the Gated_FSMN block.

        Args:
            x (Tensor): Input tensor of shape (batch, sequence length, in_channels).

        Returns:
            Tensor: Output tensor after applying gated FSMN and feedforward operations.
        
clearvoice/clearvoice/models/mossformer2_ss/mossformer2_block.py