Spec-Zone.ru › TensorFlow 2.4

tf.keras.activations.serialize

View source on GitHub

Returns the string identifier of an activation function.

View aliases

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.keras.activations.serialize

tf.keras.activations.serialize(
    activation
)
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.4/api_docs/python/tf/keras/activations/serialize

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API