Serialize the optimizer configuration to JSON compatible python dict.
tf.keras.optimizers.serialize(
optimizer, use_legacy_format=False
)
The configuration can be used for persistence and reconstruct the
Optimizer
instance again.
tf.keras.optimizers.serialize(tf.keras.optimizers.legacy.SGD())
{'class_name': 'SGD', 'config': {'name': 'SGD', 'learning_rate': 0.01,
'decay': 0.0, 'momentum': 0.0,
'nesterov': False} }
Args |
optimizer
|
An Optimizer instance to serialize.
|
Returns |
Python dict which contains the configuration of the input optimizer.
|