pypomp.LearningRate.cosine_decay

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

Apply a cosine cooling schedule to all current rates.

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 cosine decay applied.

Return type:

LearningRate