def forward(self, x):
        """
        Forward pass of the FBMSNet model.

        Parameters
        ----------
        x : torch.Tensor
            Input tensor with shape (batch_size, n_chans, n_times).

        Returns
        -------
        torch.Tensor
            Output tensor with shape (batch_size, n_outputs).
        """
        batch, _, _ = x.shape

        # shape: (batch, n_chans, n_times)
        x = self.spectral_filtering(x)
        # shape: (batch, n_bands, n_chans, n_times)

        # Mixed convolution
        x = self.mix_conv(x)
        # shape: (batch, self.n_filters_spat, n_chans, n_times)

        # Spatial convolution block
        x = self.spatial_conv(x)
        # shape: (batch, self.out_channels_spatial, 1, n_times)

        # Apply some padding to the input to make it divisible by the stride factor
        x = self.padding_layer(x)
        # shape: (batch, self.out_channels_spatial, 1, n_times_padded)

        # Reshape for temporal layer
        x = x.view(batch, self.out_channels_spatial, self.stride_factor, -1)
        # shape: (batch, self.out_channels_spatial, self.stride_factor, n_times/self.stride_factor)

        # Temporal aggregation
        x = self.temporal_layer(x)
        # shape: (batch, self.out_channels_spatial, self.stride_factor, 1)

        # Flatten and classify
        x = self.flatten_layer(x)
        # shape: (batch, self.out_channels_spatial*self.stride_factor)

        x = self.final_layer(x)
        # shape: (batch, n_outputs)
        return x

        Forward pass of the FBMSNet model.

        Parameters
        ----------
        x : torch.Tensor
            Input tensor with shape (batch_size, n_chans, n_times).

        Returns
        -------
        torch.Tensor
            Output tensor with shape (batch_size, n_outputs).
        
braindecode/models/fbmsnet.py