W3cubDocs

/TensorFlow 2.3

tf.keras.activations.serialize

View source on GitHub

Returns the string identifier of an activation function.

Arguments
activation Function object.
Returns
String denoting the name attribute of the input function

For example:

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')
Raises
ValueError The input function is not a valid one.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/keras/activations/serialize