def __init__(
        self,
        n_times: int,
        in_channels: int,
        out_channels: int = 64,
        kernel_sizes: Sequence[int] = [63, 31],
        stride_factor: int = 8,
        n_bands: int = 2,
        drop_prob: float = 0.5,
        activation: nn.Module = nn.GELU,
        dim: int = 3,
    ):
        """
        Parameters
        ----------
        in_channels : int
            Number of input channels.
        out_channels : int, default=64
            Number of output channels.
        kernel_sizes : list of int, default=[63, 31]
            List of kernel sizes for temporal convolutions.
        stride_factor : int, default=4
            Stride factor for temporal segmentation.
        n_bands : int, default=2
            Number of frequency bands or groups.
        drop_prob : float, default=0.5
            Dropout probability.
        activation: nn.Module, default=nn.GELU
            Activation function after the InterFrequency Layer
        dim: int, default=3
            Internal dimensional to apply the LogPowerLayer
        """
        super().__init__()
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.n_bands = n_bands
        self.stride_factor = stride_factor
        self.drop_prob = drop_prob
        self.activation = activation
        self.dim = dim
        self.n_times = n_times
        self.kernel_sizes = kernel_sizes

        if self.n_bands != len(self.kernel_sizes):
            warn(
                f"Got {self.n_bands} bands, different from {len(self.kernel_sizes)} amount of "
                "kernels to build the temporal convolution, we will apply "
                "min(n_bands, len(self.kernel_size) to apply the convolution.",
                UserWarning,
            )
            if self.n_bands > len(self.kernel_sizes):
                self.n_bands = len(self.kernel_sizes)
                warn(
                    f"Reducing number of bands to {len(self.kernel_sizes)} to match the number of kernels.",
                    UserWarning,
                )
            elif self.n_bands < len(self.kernel_sizes):
                self.kernel_sizes = self.kernel_sizes[: self.n_bands]
                warn(
                    f"Reducing number of kernels to {self.n_bands} to match the number of bands.",
                    UserWarning,
                )

        if self.n_times % self.stride_factor != 0:
            warn(
                f"Time dimension ({self.n_times}) is not divisible by"
                f" stride_factor ({self.stride_factor}). Input will be padded.",
                UserWarning,
            )

        out_channels_spatial = self.out_channels * self.n_bands

        # Spatial convolution
        self.spatial_conv = nn.Conv1d(
            in_channels=self.in_channels,
            out_channels=out_channels_spatial,
            kernel_size=1,
            groups=self.n_bands,
            bias=False,
        )
        self.spatial_bn = nn.BatchNorm1d(out_channels_spatial)

        self.unpack_bands = nn.Unflatten(
            dim=1, unflattened_size=(self.n_bands, self.out_channels)
        )

        # Temporal convolutions for each radix
        self.temporal_convs = nn.ModuleList()
        for kernel_size in self.kernel_sizes:
            self.temporal_convs.append(
                nn.Sequential(
                    nn.Conv1d(
                        in_channels=self.out_channels,
                        out_channels=self.out_channels,
                        kernel_size=kernel_size,
                        padding=kernel_size // 2,
                        groups=self.out_channels,
                        bias=False,
                    ),
                    nn.BatchNorm1d(self.out_channels),
                )
            )
        # Inter-frequency module
        self.inter_frequency = _InterFrequencyModule(activation=self.activation)

        if self.n_times % self.stride_factor != 0:
            self.padding_size = stride_factor - (self.n_times % stride_factor)
            self.n_times_padded = self.n_times + self.padding_size
            self.padding_layer = nn.ConstantPad1d((0, self.padding_size), 0.0)
        else:
            self.padding_layer = nn.Identity()
            self.n_times_padded = self.n_times

        # Log-Power layer
        self.log_power = LogPowerLayer(dim=self.dim)  # type: ignore
        # Dropout
        self.dropout_layer = nn.Dropout(self.drop_prob)

        Parameters
        ----------
        in_channels : int
            Number of input channels.
        out_channels : int, default=64
            Number of output channels.
        kernel_sizes : list of int, default=[63, 31]
            List of kernel sizes for temporal convolutions.
        stride_factor : int, default=4
            Stride factor for temporal segmentation.
        n_bands : int, default=2
            Number of frequency bands or groups.
        drop_prob : float, default=0.5
            Dropout probability.
        activation: nn.Module, default=nn.GELU
            Activation function after the InterFrequency Layer
        dim: int, default=3
            Internal dimensional to apply the LogPowerLayer
        
braindecode/models/ifnet.py