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

Function TF_Run

tensorflow/c/c_api.cc:468–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466extern "C" {
467
468void TF_Run(TF_DeprecatedSession* s, const TF_Buffer* run_options,
469 // Input tensors
470 const char** c_input_names, TF_Tensor** c_inputs, int ninputs,
471 // Output tensors
472 const char** c_output_names, TF_Tensor** c_outputs, int noutputs,
473 // Target nodes
474 const char** c_target_oper_names, int ntargets,
475 TF_Buffer* run_metadata, TF_Status* status) {
476 TF_Run_Setup(noutputs, c_outputs, status);
477 std::vector<std::pair<string, Tensor>> input_pairs(ninputs);
478 if (!TF_Run_Inputs(c_inputs, &input_pairs, status)) return;
479 for (int i = 0; i < ninputs; ++i) {
480 input_pairs[i].first = c_input_names[i];
481 }
482 std::vector<string> output_names(noutputs);
483 for (int i = 0; i < noutputs; ++i) {
484 output_names[i] = c_output_names[i];
485 }
486 std::vector<string> target_oper_names(ntargets);
487 for (int i = 0; i < ntargets; ++i) {
488 target_oper_names[i] = c_target_oper_names[i];
489 }
490 TF_Run_Helper(s->session, nullptr, run_options, input_pairs, output_names,
491 c_outputs, target_oper_names, run_metadata, status);
492}
493
494void TF_PRunSetup(TF_DeprecatedSession* s,
495 // Input names

Callers 2

TF_Run_wrapper_helperFunction · 0.85
TESTFunction · 0.85

Calls 3

TF_Run_SetupFunction · 0.85
TF_Run_InputsFunction · 0.85
TF_Run_HelperFunction · 0.85

Tested by 1

TESTFunction · 0.68