On this page
tf.keras.optimizers.schedules.serialize
Serializes a LearningRateSchedule into a JSON-compatible representation.
tf.keras.optimizers.schedules.serialize(
    learning_rate_schedule
)
  | Args | |
|---|---|
learning_rate_schedule | 
      The LearningRateSchedule object to serialize. | 
     
| Returns | |
|---|---|
| A JSON-serializable dict representing the object's config. | 
Example:
lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(
  0.1, decay_steps=100000, decay_rate=0.96, staircase=True)
tf.keras.optimizers.schedules.serialize(lr_schedule)
{'class_name': 'ExponentialDecay', 'config': {...} }
 © 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
 https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/keras/optimizers/schedules/serialize