Created
September 21, 2017 14:39
-
-
Save blorgblerg/6f9b662a367a102cb5a6289b532ca3ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from https://stackoverflow.com/a/44947501