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

Method ExtractForSignature

tensorflow/core/grappler/graph_analyzer/subgraph.cc:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void Subgraph::ExtractForSignature(SigNodeMap* result) {
95 // Mapping of nodes from the original graph to the new one.
96 SigNode::TranslationMap full_to_new;
97
98 for (auto node : id_) {
99 auto newnode_ref = absl::make_unique<SigNode>(node->node_def());
100 auto newnode = newnode_ref.get();
101 (*result)[node->name()] = std::move(newnode_ref);
102 full_to_new[node] = newnode;
103 }
104
105 for (const auto& mapping : full_to_new) {
106 mapping.second->CopyLinks(*mapping.first, full_to_new);
107 }
108}
109
110//=== Subgraph
111

Callers 5

BuildSigMapMethod · 0.80
TEST_FFunction · 0.80
TestGraphEveryWayMethod · 0.80
TESTFunction · 0.80
CollateResultMethod · 0.80

Calls 4

CopyLinksMethod · 0.80
nameMethod · 0.65
node_defMethod · 0.45
getMethod · 0.45

Tested by 4

BuildSigMapMethod · 0.64
TEST_FFunction · 0.64
TestGraphEveryWayMethod · 0.64
TESTFunction · 0.64