tensorflow / 2.9.1 / keras / optimizers / schedules / deserialize.html /

tf.keras.optimizers.schedules.deserialize

Instantiates a LearningRateSchedule object from a serialized form.

Args
config The serialized form of the LearningRateSchedule. Dictionary of the form {'class_name': str, 'config': dict}.
custom_objects A dictionary mapping class names (or function names) of custom (non-Keras) objects to class/functions.
Returns
A LearningRateSchedule object.

Example:

# Configuration for PolynomialDecay
config = {
  'class_name': 'PolynomialDecay',
  'config': {'cycle': False,
    'decay_steps': 10000,
    'end_learning_rate': 0.01,
    'initial_learning_rate': 0.1,
    'name': None,
    'power': 0.5} }
lr_schedule = tf.keras.optimizers.schedules.deserialize(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/deserialize