With warm restarts the cycle length grows by a fixed multiplier after each restart. Locating a global step means subtracting whole cycles and tracking the current cycle length.
Implement sgdr_position(t, T0, Tmult), returning the position in the current cycle and its length.
Subtract the current cycle length from t while t is at least that length, growing the cycle length each time.
No results yet
Run your code to check it against the examples, or submit to run every test.