pdft.training.cosine_with_warmup#
- pdft.training.cosine_with_warmup(step, total_steps, *, warmup_frac=0.05, lr_peak=0.01, lr_final=0.001)[source]#
Linear warmup followed by cosine decay.
Mirror of
ParametricDFT.jl/src/training.jl::_cosine_with_warmup.stepis 0-indexed conceptually but Julia uses 1-indexed; we match Julia’s behavior: the warmup ramp ends exactly atstep == warmup_stepswherewarmup_steps = max(1, round(warmup_frac * total_steps)).