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

        Parameters
        ----------
        x : torch.Tensor
            Input tensor of shape (batch_size, channel, length).

        Returns
        -------
        torch.Tensor
            Output tensor after applying the SE recalibration.
        """
        b, c, _ = x.size()
        y = self.avg_pool(x).view(b, c)
        y = self.fc(y).view(b, c, 1)
        return x * y.expand_as(x)

        Forward pass of the SE layer.

        Parameters
        ----------
        x : torch.Tensor
            Input tensor of shape (batch_size, channel, length).

        Returns
        -------
        torch.Tensor
            Output tensor after applying the SE recalibration.
        
braindecode/models/sleep_stager_eldele_2021.py