tf.keras.activations.serialize
View source on GitHub |
Returns the string identifier of an activation function.
tf.keras.activations.serialize( activation )
Args | |
---|---|
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. |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/keras/activations/serialize