Adds Session.restore
to allow loading of checkpoints saved by Session.save
#225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows the easy restoration of checkpoints during training. A fresh graph object loaded from a
GraphDef
will not have aSaverDef
defined, so the method that creates aSaverDef
was modified to check if the graph already had restore operations, in which case the names of the operations are filled in rather than trying to mutate the graph twice (which will throw an exception). The names are set based on the defaults used in Saver.py, though it's not identical as that adds an extra placeholder called "save/Const" for unspecified backwards compatibility, and when I mirror that in Java calling session.run gives TFIllegalArgumentException complaining that placeholder is unfilled.It's not quite the same as the TF 2 checkpoint restore mechanism, but that seems tightly woven into the Python structure and we don't quite have the infrastructure yet.
I also bumped the version of
maven-surefire-plugin
as otherwise I get error messages out of Maven when running the tests. Not sure when this started, but it's happening for me on Ubuntu 20.04 x86_64.