Skip to content

Instantly share code, notes, and snippets.

@post2web
Last active May 24, 2017 13:42
Show Gist options
  • Save post2web/b11282819750002b69d9b3114bdf2a02 to your computer and use it in GitHub Desktop.
Save post2web/b11282819750002b69d9b3114bdf2a02 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment