Created
May 18, 2022 12:07
-
-
Save MovsisyanM/98f8d10828f3cd15792f8789845c5d0a to your computer and use it in GitHub Desktop.
Capped ReLU activation function
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 capped_relu(x): | |
"""Mirrored-Z shaped activation function: min(10, relu(x))""" | |
return tf.minimum(tf.keras.activations.relu(x), 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment