Update SavedModel C++ loader to allow graphs without variables.

Change: 147247341
This commit is contained in:
Sukriti Ramesh 2017-02-11 08:37:32 -08:00 committed by TensorFlower Gardener
parent a5d79028e0
commit c4423aec4a

View File

@ -121,8 +121,9 @@ Status RunRestore(const RunOptions& run_options, const string& export_dir,
const string variables_index_path = io::JoinPath(
variables_directory, MetaFilename(kSavedModelVariablesFilename));
if (!Env::Default()->FileExists(variables_index_path).ok()) {
return errors::NotFound(
"Checkpoint index file not found in SavedModel directory.");
LOG(INFO) << "The specified SavedModel has no variables; no checkpoints "
"were restored.";
return Status::OK();
}
const string variables_path =
io::JoinPath(variables_directory, kSavedModelVariablesFilename);