Lookahead (Zhang et al., 2019) wraps any inner optimizer. It keeps a slow copy of the weights, runs k fast steps, then moves the slow weights part of the way toward the result.
Implement lookahead_sync(slow, fast, alpha), the interpolation of slow weights toward fast ones.
Add alpha times the difference between the fast and slow weights to the slow weights.
No results yet
Run your code to check it against the examples, or submit to run every test.