Skip to content

Instantly share code, notes, and snippets.

@blorgblerg
Created September 21, 2017 14:39
Show Gist options
  • Save blorgblerg/6f9b662a367a102cb5a6289b532ca3ca to your computer and use it in GitHub Desktop.
Save blorgblerg/6f9b662a367a102cb5a6289b532ca3ca to your computer and use it in GitHub Desktop.
def PReLU(_x, name):
_alpha = tf.get_variable(name, shape=_x.get_shape()[-1],
dtype=_x.dtype, initializer=tf.constant_initializer(0.1))
return tf.maximum(0.0, _x) + _alpha * tf.minimum(0.0, _x)
@blorgblerg
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment