def forward(self, X: torch.Tensor):
        """
        Forward pass of the model.

        Parameters
        ----------
        X: torch.Tensor
            The input tensor of the model with shape (batch_size, n_channels, n_times)

        Returns
        -------
        torch.Tensor
            The output tensor of the model with shape (batch_size, n_outputs)
        """
        emb = self.encoder(X).squeeze(-1)
        out = self.final_layer(emb)
        return out

        Forward pass of the model.

        Parameters
        ----------
        X: torch.Tensor
            The input tensor of the model with shape (batch_size, n_channels, n_times)

        Returns
        -------
        torch.Tensor
            The output tensor of the model with shape (batch_size, n_outputs)
        
braindecode/models/sparcnet.py