post2web
3/18/2017 - 9:17 PM

leaky ReLU

def lrelu(x, leak=0.1):
    f1 = 0.5 * (1 + leak)
    f2 = 0.5 * (1 - leak)
    return f1 * x + f2 * abs(x)
        
 def lrelu(x, leak = 0.1):
    return tf.maximum(leak*x, x)