tf.keras.optimizers.serialize

Serialize the optimizer configuration to JSON compatible python dict.

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

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