Skip to content

Commit 1e97e3b

Browse files
update
1 parent 0cd5abf commit 1e97e3b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: load_model_tensorflow_cpp.md

+14
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ Status status = LoadSavedModel(session_options, run_options, export_dir, {kSaved
6262
if (!status.ok()) {
6363
std::cerr << "Failed: " << status;
6464
}
65+
66+
auto sig_map = model_bundle.GetSignatures();
67+
auto model_def = sig_map.at("serving_default");
68+
69+
for (auto const& p : sig_map) {
70+
std::cout << "key: " << p.first.c_str() << std::endl;
71+
}
72+
for (auto const& p : model_def.inputs()) {
73+
std::cout << "key: " << p.first.c_str() << " " << p.second.name().c_str() << std::endl;
74+
}
75+
for (auto const& p : model_def.outputs()) {
76+
std::cout << "key: " << p.first.c_str() << " " << p.second.name().c_str() << std::endl;
77+
}
78+
6579
return 0;
6680
}
6781
```

0 commit comments

Comments
 (0)