MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BindGenericNames

Function BindGenericNames

tensorflow/contrib/session_bundle/signature.cc:259–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259Status BindGenericNames(const GenericSignature& signature,
260 const std::vector<string>& input_names,
261 std::vector<string>* bound_names) {
262 const protobuf::Map<string, serving::TensorBinding>& bindings =
263 signature.map();
264
265 for (const string& entry : input_names) {
266 const auto mapped = bindings.find(entry);
267 if (mapped == bindings.end()) {
268 return errors::NotFound(
269 strings::StrCat("Could not find generic binding for: ", entry));
270 }
271 bound_names->push_back(mapped->second.tensor_name());
272 }
273 return Status::OK();
274}
275
276} // namespace serving
277} // namespace tensorflow

Callers 1

TEST_FFunction · 0.85

Calls 7

NotFoundFunction · 0.85
StrCatFunction · 0.50
mapMethod · 0.45
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
tensor_nameMethod · 0.45

Tested by 1

TEST_FFunction · 0.68