pypomp.core.learning_rate.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) – The factor to reach at the end of the schedule (between 0 and 1).

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

Returns:

A new LearningRate object with cosine decay applied.

Return type:

LearningRate