def forward(self, x):
        """
        Apply the Gather-Excite Networks block to the input tensor.

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

        Returns
        -------
        Pytorch.Tensor
        """
        scale = self.gather(x)
        scale = torch.sigmoid(self.mlp(scale))
        return scale * x

        Apply the Gather-Excite Networks block to the input tensor.

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

        Returns
        -------
        Pytorch.Tensor
        
braindecode/modules/attention.py