tf.keras.optimizers.serialize

Serialize the optimizer configuration to JSON compatible python dict.

Main aliases

tf.optimizers.serialize

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.keras.optimizers.serialize

The configuration can be used for persistence and reconstruct the Optimizer instance again.

tf.keras.optimizers.serialize(tf.keras.optimizers.SGD())
{'class_name': 'SGD', 'config': {'name': 'SGD', 'learning_rate': 0.01,
                                 'decay': 0.0, 'momentum': 0.0,
                                 'nesterov': False} }

optimizer An Optimizer instance to serialize.

Python dict which contains the configuration of the input optimizer.