def forward(self, x: torch.Tensor) -> torch.Tensor:
        """Forward pass.

        Parameters
        ----------
        x : torch.Tensor
            Input tensor of shape (batch_size, in_channels, n_times).

        Returns
        -------
        torch.Tensor
            Output tensor after processing.
        """
        batch_size, _, _ = x.shape

        # Spatial convolution
        x = self.spatial_conv(x)

        x = self.spatial_bn(x)

        # Split the output by bands for each frequency
        x_split = self.unpack_bands(x)

        x_t = []
        for idx, conv in enumerate(self.temporal_convs):
            x_t.append(conv(x_split[::, idx]))

        # Inter-frequency interaction
        x = self.inter_frequency(x_t)

        # Reshape for temporal segmentation
        x = self.padding_layer(x)
        # x is now of shape (batch_size, ..., n_times_padded)

        # Reshape for log-power computation
        x = x.view(
            batch_size,
            self.out_channels,
            self.stride_factor,
            self.n_times_padded // self.stride_factor,
        )

        # Log-Power layer
        x = self.log_power(x)

        # Dropout
        x = self.dropout_layer(x)

        return x
Forward pass.

        Parameters
        ----------
        x : torch.Tensor
            Input tensor of shape (batch_size, in_channels, n_times).

        Returns
        -------
        torch.Tensor
            Output tensor after processing.
        
braindecode/models/ifnet.py