tf.keras.activations.serialize
Stay organized with collections
Save and categorize content based on your preferences.
Returns name attribute (__name__
) of function.
tf.keras.activations.serialize(
activation
)
Arguments |
activation
|
Function
|
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.keras.activations.serialize\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/keras/activations/serialize) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/keras/activations.py#L358-L385) |\n\nReturns name attribute (`__name__`) of function.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.keras.activations.serialize`](/api_docs/python/tf/keras/activations/serialize)\n\n\u003cbr /\u003e\n\n tf.keras.activations.serialize(\n activation\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments --------- ||\n|--------------|----------|\n| `activation` | Function |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| String denoting the name attribute of the input function ||\n\n\u003cbr /\u003e\n\n#### For example:\n\n tf.keras.activations.serialize(tf.keras.activations.tanh)\n 'tanh'\n tf.keras.activations.serialize(tf.keras.activations.sigmoid)\n 'sigmoid'\n tf.keras.activations.serialize('abcd')\n Traceback (most recent call last):\n\n ValueError: ('Cannot serialize', 'abcd')\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|----------------------------------------|\n| `ValueError` | The input function is not a valid one. |\n\n\u003cbr /\u003e"]]