Module Optim.Schedule
The type for learning-rate schedules.
s step is the learning rate for 1-based step.
val constant : float -> tconstant lr is the schedule that always returns lr.
val cosine_decay :
init_value:float ->
decay_steps:int ->
?alpha:float ->
unit ->
tcosine_decay ~init_value ~decay_steps ?alpha () is cosine decay from init_value to alpha * init_value over decay_steps.
alpha defaults to 0..
val warmup_cosine :
init_value:float ->
peak_value:float ->
warmup_steps:int ->
twarmup_cosine ~init_value ~peak_value ~warmup_steps is cosine warmup from init_value to peak_value over warmup_steps.
val exponential_decay :
init_value:float ->
decay_rate:float ->
decay_steps:int ->
texponential_decay ~init_value ~decay_rate ~decay_steps is init_value * decay_rate{^ (step / decay_steps)}.
val warmup_linear :
init_value:float ->
peak_value:float ->
warmup_steps:int ->
twarmup_linear ~init_value ~peak_value ~warmup_steps is linear warmup from init_value to peak_value over warmup_steps.