def forward(self, x):
        """
        Apply the Squeeze-and-Excitation block to the input tensor.

        Parameters
        ----------
        x: Pytorch.Tensor

        Returns
        -------
        scale*x: Pytorch.Tensor
        """
        scale = self.gap(x)
        scale = self.fc1(scale)
        scale = self.nonlinearity(scale)
        scale = self.fc2(scale)
        scale = self.sigmoid(scale)
        return scale * x

        Apply the Squeeze-and-Excitation block to the input tensor.

        Parameters
        ----------
        x: Pytorch.Tensor

        Returns
        -------
        scale*x: Pytorch.Tensor
        
braindecode/modules/attention.py