def __init__(self, p: float = 3.0, p_trainable: bool = False, eps: float = 1e-7):
        """
        Args:
            p: The pooling parameter.
                Default: 3.0
            p_trainable: Whether the pooling parameter(p) should be trainable.
                    Default: False
            eps: epsilon for numerical stability.
        """
        super().__init__()
        if p_trainable:
            # if p_trainable is True and the value of p is set to math.inf

            if p not in [math.inf, float("inf")]:

                self.p = nn.Parameter(torch.ones(1) * p)
            else:

                self.p = math.inf

        else:
            self.p = p

        self.eps = eps

        Args:
            p: The pooling parameter.
                Default: 3.0
            p_trainable: Whether the pooling parameter(p) should be trainable.
                    Default: False
            eps: epsilon for numerical stability.
        
catalyst/contrib/layers/pooling.py