diff options
author | 2017-02-11 08:37:32 -0800 | |
---|---|---|
committer | 2017-02-11 08:49:02 -0800 | |
commit | c4423aec4a2af716685ae8e9b60daf721932cd21 (patch) | |
tree | 73936569a4c1cdb07ed233eb5ad73fd77ed42ca6 /tensorflow/cc/saved_model | |
parent | a5d79028e0a5c088a78a157cd9e255528349841b (diff) |
Update SavedModel C++ loader to allow graphs without variables.
Change: 147247341
Diffstat (limited to 'tensorflow/cc/saved_model')
-rw-r--r-- | tensorflow/cc/saved_model/loader.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/cc/saved_model/loader.cc b/tensorflow/cc/saved_model/loader.cc index 2acf9bf777..a7843ddb1d 100644 --- a/tensorflow/cc/saved_model/loader.cc +++ b/tensorflow/cc/saved_model/loader.cc @@ -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); |