I want to try [LeakyReLU Layer][1] in `Mathematica`,but not found. In `keras`,the `LeakyReLU` be defined like this: [![enter image description here][2]][2] So I try to use `ElementwiseLayer` to implement it. g = Function[x, Piecewise[{{0.3(*default value*)*x, x < 0}, {x, x >= 0}}], Listable]; Plot[g[x], {x, -2, 2}] g[{-1, -0.5, 0, 0.5, 1}] [![enter image description here][3]][3] But `ElementwiseLayer[g]` failed. Then I try: f = HeavisideTheta[#]*# + HeavisideTheta[-#]*0.3# &; f[{-1, -0.5, 0, 0.5, 1}] [![But `ElementwiseLayer\[f\]` also failed][4]][4]. [![enter image description here][5]][5] It also failed,so it's confused me, how to make LeakyReLU or other advanced activations layers in Mathematica? [1]: https://keras.io/layers/advanced-activations/ [2]: https://i.sstatic.net/87brz.png [3]: https://i.sstatic.net/8M9Z8.png [4]: https://i.sstatic.net/nEfC5.png [5]: https://i.sstatic.net/8QJ59.png