View source on GitHub |
Returns name attribute (__name__
) of function.
tf.keras.activations.serialize(
activation
)
activation
: FunctionString denoting the name attribute of the input function
>>> tf.keras.activations.serialize(tf.keras.activations.tanh)
'tanh'
>>> tf.keras.activations.serialize(tf.keras.activations.sigmoid)
'sigmoid'
>>> tf.keras.activations.serialize('abcd')
Traceback (most recent call last):
...
ValueError: ('Cannot serialize', 'abcd')
ValueError
: The input function is not a valid one.