Milestone decay — multiply lr by at each passed milestone.
Math
where is the sorted milestone set.
Attributes
milestones_vector of intEpochs at which to apply the decay, sorted ascending at construction.
gamma_floatMultiplicative decay factor applied once per passed milestone.
Notes
Duplicate milestones decay the lr twice at the same epoch — this matches the reference framework's behaviour and is rarely useful in practice.
Constructors
1ctor
MultiStepLR
void MultiStepLR(Optimizer & opt, int milestones, double gamma)Build a milestone decay schedule.
Parameters
optOptimizerTarget optimiser.
milestonesvector of intEpochs at which to decay. Sorted ascending internally.
gammafloat, default 0.1Multiplicative decay factor per milestone.