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

Function AddNodeToTargets

tensorflow/core/graph/subgraph.cc:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177bool AddNodeToTargets(const string& node_or_tensor_name,
178 const NameIndex& name_index,
179 std::unordered_set<const Node*>* targets) {
180 TensorId id = ParseTensorName(node_or_tensor_name);
181 auto iter = name_index.find(id.first);
182 if (iter == name_index.end()) {
183 return false;
184 }
185 const Node* n = iter->second;
186 CHECK_EQ(n->name(), id.first);
187 targets->insert(n);
188 return true;
189}
190
191Status PruneForTargets(Graph* g, const NameIndex& name_index,
192 const std::vector<Node*>& fetch_nodes,

Callers 1

PruneForTargetsFunction · 0.85

Calls 5

ParseTensorNameFunction · 0.85
nameMethod · 0.65
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected