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

        Parameters
        ----------
        x: PyTorch Tensor
            Input tensor of shape (batch_size, n_channels, n_times)

        Returns
        -------
        PyTorch Tensor (optional)
            Output tensor of shape (batch_size, n_outputs)
        """
        x_rs = self.resample(x.contiguous())
        feat = torch.relu(self.bn(self.conv(x_rs)))
        for seq in self.blocks:
            feat = seq(feat)
        feat = feat.mean(dim=2)
        if self.return_feature:
            return feat
        else:
            return self.final_layer(feat)

        Forward pass of the model.

        Parameters
        ----------
        x: PyTorch Tensor
            Input tensor of shape (batch_size, n_channels, n_times)

        Returns
        -------
        PyTorch Tensor (optional)
            Output tensor of shape (batch_size, n_outputs)
        
braindecode/models/eegsimpleconv.py