lessw2020 / Ranger-Deep-Learning-Optimizer

Ranger - a synergistic optimizer using RAdam (Rectified Adam), Gradient Centralization and LookAhead in one codebase
Apache License 2.0
1.19k stars 176 forks source link

BUG: Fix setstate in RangerVA #30

Closed scottclowe closed 4 years ago

scottclowe commented 4 years ago

Fix reference to super class which was breaking RangerVA.__setstate__(state) and hence resuming from checkpoint with, for instance, optimizer.load_state_dict(checkpoint["optimizer"]).

lessw2020 commented 4 years ago

Thanks much @scottclowe! Longer term I think we should just move everything to the parameter-less super calls as this issue has burned me before re: having the parameterized super hanging around.

"The parameterless call to super() is recommended and sufficient for most use cases, and needing to change the search hierarchy regularly could be indicative of a larger design issue."

Thanks for the fix, much appreciated!