TensorFlow

API

 tf.keras / activations / activations.relu


Returns the string identifier of an activation function.

activation Function object.

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')

ValueError The input function is not a valid one.

此页内容是否对您有帮助