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

Function ResetInputs

tensorflow/core/graph/star_server_graph_partition.cc:414–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414void ResetInputs(const std::vector<std::string> &input_names,
415 NodeDef *node_def) {
416 node_def->clear_input();
417 std::vector<size_t> control_input_idxs;
418 for (size_t i = 0; i < input_names.size(); i++) {
419 const std::string &input_name = input_names[i];
420 assert(!input_name.empty());
421 if (input_name[0] == '^') {
422 control_input_idxs.push_back(i);
423 continue;
424 }
425 *node_def->add_input() = input_name;
426 }
427
428 for (size_t i = 0; i < control_input_idxs.size(); i++) {
429 *node_def->add_input() = input_names[control_input_idxs[i]];
430 }
431}
432
433void ResetInputs(
434 const std::vector<std::pair<int, std::string>> &inputs,

Callers 4

TEST_FFunction · 0.85
ProcessSubNodeInputsMethod · 0.85
ProcessRunGraphInputsMethod · 0.85

Calls 6

sizeMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
add_inputMethod · 0.45
resizeMethod · 0.45
num_inputsMethod · 0.45

Tested by 1

TEST_FFunction · 0.68