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

Function VerifyNoDuplicateNodeNames

tensorflow/core/graph/validate.cc:118–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118Status VerifyNoDuplicateNodeNames(const GraphDef& graph) {
119 absl::flat_hash_set<absl::string_view> nodes;
120 for (const auto& node : graph.node()) {
121 if (nodes.contains(node.name())) {
122 return errors::AlreadyExists("Node already exists: ", node.name());
123 }
124 nodes.insert(node.name());
125 }
126 return Status::OK();
127}
128
129} // namespace graph
130} // namespace tensorflow

Callers 2

VerifyMethod · 0.85
TESTFunction · 0.85

Calls 4

containsMethod · 0.80
nameMethod · 0.65
nodeMethod · 0.45
insertMethod · 0.45

Tested by 1

TESTFunction · 0.68