A fixed learning rate is a compromise: large enough to make progress early, and therefore too large to settle later. Decaying it fixes both ends — move fast at first, then take smaller steps as you approach a minimum.
Task: write linear_schedule(initial_lr, final_lr, total_steps) returning the learning rate at every step, rounded to 6 decimal places.
total_steps entries.0 is initial_lr and the last step is exactly final_lr, with even spacing between — so the divisor is total_steps - 1.total_steps = 1 returns just [initial_lr].total_steps = 0 returns an empty list.Six decimal places, not four, because learning rates live down at 1e-4 and below — rounding to 4 would flatten most real schedules into a list of zeros.