def forward(self, x, eps: float = 1e-5):
        """
        Apply the Gated Channel Transformation block to the input tensor.

        Parameters
        ----------
        x: Pytorch.Tensor
        eps: float, default=1e-5

        Returns
        -------
        Pytorch.Tensor
            the original tensor x multiplied by the gate.
        """
        embedding = (x.pow(2).sum((2, 3), keepdim=True) + eps).pow(0.5) * self.alpha
        norm = self.gamma / (embedding.pow(2).mean(dim=1, keepdim=True) + eps).pow(0.5)
        gate = 1.0 + torch.tanh(embedding * norm + self.beta)
        return x * gate

        Apply the Gated Channel Transformation block to the input tensor.

        Parameters
        ----------
        x: Pytorch.Tensor
        eps: float, default=1e-5

        Returns
        -------
        Pytorch.Tensor
            the original tensor x multiplied by the gate.
        
braindecode/modules/attention.py