Uh oh!
There was an error while loading. Please reload this page.
add test for reloading lookahead optimizer - #2102
Conversation
bot-of-gabrieldemarmiesse
commented
Aug 19, 2020
You are owner of some files modified in this pull request. |
bhack
commented
Aug 19, 2020
The original tests mentioned in the ticket was testing model serializzation? |
BinyanHu
commented
Aug 19, 2020
The description from the ticket was inaccurate. I raised that issue and the problem is on save and reloading. Please check the the discussions in the issue(#2094) for more details. |
bhack
commented
Aug 19, 2020
I was talking about save and reloading original contributor test in https://github.com/CyberZHG/keras-lookahead/blob/master/tests/test_optimizers.py |
BinyanHu
commented
Aug 20, 2020
That is a different way to save a model. The contributor test uses |
BinyanHu
commented
Aug 20, 2020
Just updated the test file referring to the original contributor test. I added cases of whether the inner optimizer contains slots (adam) or not (sgd) and different saving and reloading methods (weights only and whole graph). All tests of "sgd" pass and those of "adam" fail, which I believe should be enough to demonstrate the problem. |
bhack
commented
Aug 20, 2020
Ok, have you double checked https://stackoverflow.com/questions/56805588/does-load-model-load-optimizer-state? |
Uh oh!
There was an error while loading. Please reload this page.
bhack
commented
Aug 30, 2020
@WindQAQ Let me know if you still find useful to have a save_weight/load_weight test. In that case give a pass over the test. |
* Update lookahead.py Inital fix of tensorflow#2094tensorflow#2102 * Fix linting * Resolve name conflict with mixed prexision * Track baseline optimizer in avg
Description
Brief Description of the PR: add the test for saving and reloading a Lookahead optimizer. The added test function reveals the bug that the states of a lookahead's inner optimizer are not properly saved and reloaded (#2094). So the test can not pass currently.
Type of change
Checklist:
How Has This Been Tested?
If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes: