The MeLU function is an activation function that adds Mexican-hat-shaped functions to PReLU so that it can learn nonlinearity more flexibly.

The PReLU slope pp and the coefficients cjc_j of the Mexican-hat functions are learnable parameters. aja_j and λj\lambda_j are not learned; they are fixed in advance based on the upper bound of the input (maxInput). If all cjc_j are initialized to 0, the function starts out with the same shape as PReLU.

MeLU(x)=PReLU(x)+∑j=1k−1cj⋅max⁡(λj−∣x−aj∣,0)\text{MeLU}(x) = PReLU(x) + \sum_{j=1}^{k-1} c_j \cdot \max(\lambda_j - |x - a_j|, 0) PReLU(x)={xif x≥0pxif x<0\text{PReLU}(x) = \begin{cases} x & \text{if } x \geq 0 \\\\ p x & \text{if } x < 0 \end{cases}