ScheduleWrapper
- class opennmt.schedules.ScheduleWrapper(schedule, step_start=0, step_duration=1, minimum_learning_rate=0)[source]
Wrapper to augment a learning rate scheduler behavior.
Inherits from:
keras.src.optimizers.schedules.learning_rate_schedule.LearningRateSchedule
- __init__(schedule, step_start=0, step_duration=1, minimum_learning_rate=0)[source]
Initializes the decay function.
- Parameters
schedule – A
tf.keras.optimizers.schedules.LearningRateSchedule
.step_duration – The number of training steps that make 1 decay step.
start_step – Start decay after this many steps.
minimum_learning_rate – Do not decay past this learning rate value.