Two gaps in src/optim/schedule.rs:
StepDecay::new(base, 0, gamma) then panics with "attempt to divide by zero" on
the first lr_at (schedule.rs:51). Nothing validates every in the
constructor.
OneCycle with warmup_fraction > 1.0 makes warmup > total, so
self.total - warmup underflows usize (schedule.rs:140). Panic in debug,
nonsense remaining in release, since the release profile has overflow checks
off.
Every other builder in optim/ already asserts its range (Adadelta::rho,
RMSprop::alpha, Lookahead::new), these two just got missed.
Two gaps in
src/optim/schedule.rs:StepDecay::new(base, 0, gamma)then panics with "attempt to divide by zero" onthe first
lr_at(schedule.rs:51). Nothing validateseveryin theconstructor.
OneCyclewithwarmup_fraction > 1.0makeswarmup > total, soself.total - warmupunderflowsusize(schedule.rs:140). Panic in debug,nonsense
remainingin release, since the release profile has overflow checksoff.
Every other builder in
optim/already asserts its range (Adadelta::rho,RMSprop::alpha,Lookahead::new), these two just got missed.