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

Function BindGenericInputs

tensorflow/contrib/session_bundle/signature.cc:242–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242Status BindGenericInputs(const GenericSignature& signature,
243 const std::vector<std::pair<string, Tensor>>& inputs,
244 std::vector<std::pair<string, Tensor>>* bound_inputs) {
245 const protobuf::Map<string, serving::TensorBinding>& bindings =
246 signature.map();
247
248 for (const auto& entry : inputs) {
249 const auto mapped = bindings.find(entry.first);
250 if (mapped == bindings.end()) {
251 return errors::NotFound(
252 strings::StrCat("Could not find generic binding for: ", entry.first));
253 }
254 bound_inputs->push_back({mapped->second.tensor_name(), entry.second});
255 }
256 return Status::OK();
257}
258
259Status BindGenericNames(const GenericSignature& signature,
260 const std::vector<string>& input_names,

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