serialize
method of
TensorFlow
tf.keras.activations
module
returns the string identifier of an activation function.
tf.keras.activations.serialize(
activation
)
activation
: (Required) Function object.
tf.keras.activations.serialize() returns String denoting the name attribute of the input function.
ValueError
:
raises
ValueError
if provided function object is not valid activation function.
sigmoid
function using
serialize
method
import tensorflow as tf
sigmoid_identifier = tf.keras.activations.serialize(tf.keras.activations.sigmoid)
print(sigmoid_identifier)
sigmoid
linear
function using
serialize
method
import tensorflow as tf
linear_identifier = tf.keras.activations.serialize(tf.keras.activations.linear)
print(linear_identifier)
linear
Category: TensorFlow