optax
optax copied to clipboard
MultiSteps does not work with update functions that require parameters
The MultiSteps wrapper https://github.com/deepmind/optax/blob/30947fbc5743adc3e997c6242fa3775834862a74/optax/_src/wrappers.py#L179 for gradient accumulation does not feed parameters to the wrapped optimizer. These are needed for e.g. weight decay https://github.com/deepmind/optax/blob/30947fbc5743adc3e997c6242fa3775834862a74/optax/_src/transform.py#L547 which I think is used in almost every optimizer chain.
As far as I can tell every transformation accepts params, so is there any reason not to pipe them through?
As I understand, this bug was fixed by #150 at the time so I am closing this issue. Thanks a lot for reporting!