Unverified Commit c9163a8d authored by Ali Modarressi's avatar Ali Modarressi Committed by GitHub
Browse files

delay decay schedule until the end of warmup (#4940)

parent f216b606
...@@ -44,7 +44,7 @@ class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule): ...@@ -44,7 +44,7 @@ class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule):
return tf.cond( return tf.cond(
global_step_float < warmup_steps_float, global_step_float < warmup_steps_float,
lambda: warmup_learning_rate, lambda: warmup_learning_rate,
lambda: self.decay_schedule_fn(step), lambda: self.decay_schedule_fn(step - self.warmup_steps),
name=name, name=name,
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment