Julia equivalence tf.nn.l2_loss(x) in Flux

You can read a bit about regularization in the flux documentation.
The idea is that you simple create your own regularization expression using julia code, and include that as part of the loss function.