Update SavedModel C++ loader to allow graphs without variables.
Change: 147247341
This commit is contained in:
parent
a5d79028e0
commit
c4423aec4a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user