How to add an ABS layer to network?

I want to add an ABS layer in my network, like this
In tensorflow, I can use this method:
How can i do that in pytorch? Thank you for your help!!

I forgot explain that ABS means absolute value… Sorry

If z_conv is the output from the previous layer, can’t you just use z_conv = z_conv.abs() ?