pypomp.LearningRate.linear_decay

LearningRate.linear_decay(final_factor: float, M: int) LearningRate[source]

Apply a linear decay schedule.

Linearly interpolates learning rates from their initial values down to initial values multiplied by final_factor.

Parameters:
  • final_factor (float) – Multiplier to reach at the end of the schedule. Must be in the interval \([0, 1]\).

  • M (int) – Number of iterations for the schedule.

Returns:

A new learning rate object with linear decay applied.

Return type:

LearningRate