Optimization & Training Dynamics · Problem 2 of 5
Implement a cosine LR schedule with linear warmup as a callable.
Implement the function/class skeleton in the editor. Any correct approach is accepted.
import math
def cosine_with_warmup(peak_lr, warmup_steps, total_steps, min_lr=0.0):
raise NotImplementedErrorReady when you are
Submit your solution and a structured review appears here — verdict, score, and concrete feedback. Any correct approach passes.
Implement a cosine LR schedule with linear warmup as a callable.
Implement the function/class skeleton in the editor. Any correct approach is accepted.