I need a specific custom activation function; how can I implement it with `Piecewise`? 

This is what I've tried (using the recommendation from [this question](https://mathematica.stackexchange.com/questions/146569/how-to-make-advanced-activations-layers-in-mathematica)):

```
p = Function[x, Piecewise[{{Exp[x] - (2 + E)/(2 E), x < -1}, {x/2, x < 0}, {x, 
 x > 0}}], Listable]
ElementwiseLayer[p]

```

[![enter image description here](https://i.stack.imgur.com/RtKj3.png)](https://i.stack.imgur.com/RtKj3.png)

Is there a systematic workaround to handle the conversion from an aribitrary `Piecewise` function into an `ElementwiseLayer`?