code: def L1(layer="input", constant=0, batch=None):
    
    if batch is None:
      return lambda T: tf.reduce_sum(tf.abs(T(layer) - constant))
    else:
      return lambda T: tf.reduce_sum(tf.abs(T(layer)[batch] - constant))
docs: L1 norm of layer. Generally used as penalty.