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

Function TF_PRun

tensorflow/c/c_api.cc:526–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526void TF_PRun(TF_DeprecatedSession* s, const char* handle,
527 // Input tensors
528 const char** c_input_names, TF_Tensor** c_inputs, int ninputs,
529 // Output tensors
530 const char** c_output_names, TF_Tensor** c_outputs, int noutputs,
531 // Target nodes
532 const char** c_target_oper_names, int ntargets,
533 TF_Status* status) {
534 TF_Run_Setup(noutputs, c_outputs, status);
535 std::vector<std::pair<string, Tensor>> input_pairs(ninputs);
536 if (!TF_Run_Inputs(c_inputs, &input_pairs, status)) return;
537 for (int i = 0; i < ninputs; ++i) {
538 input_pairs[i].first = c_input_names[i];
539 }
540
541 std::vector<string> output_names(noutputs);
542 for (int i = 0; i < noutputs; ++i) {
543 output_names[i] = c_output_names[i];
544 }
545 std::vector<string> target_oper_names(ntargets);
546 for (int i = 0; i < ntargets; ++i) {
547 target_oper_names[i] = c_target_oper_names[i];
548 }
549 TF_Run_Helper(s->session, handle, nullptr, input_pairs, output_names,
550 c_outputs, target_oper_names, nullptr, status);
551}
552
553TF_Library* TF_LoadLibrary(const char* library_filename, TF_Status* status) {
554 TF_Library* lib_handle = new TF_Library;

Callers 1

TF_Run_wrapper_helperFunction · 0.85

Calls 3

TF_Run_SetupFunction · 0.85
TF_Run_InputsFunction · 0.85
TF_Run_HelperFunction · 0.85

Tested by

no test coverage detected