aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/saved_model
diff options
context:
space:
mode:
authorGravatar Sukriti Ramesh <sukritiramesh@google.com>2017-02-11 08:37:32 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-11 08:49:02 -0800
commitc4423aec4a2af716685ae8e9b60daf721932cd21 (patch)
tree73936569a4c1cdb07ed233eb5ad73fd77ed42ca6 /tensorflow/cc/saved_model
parenta5d79028e0a5c088a78a157cd9e255528349841b (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.cc5
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);