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

Function GetNodeNameToNodeDefMap

tensorflow/cc/tools/freeze_saved_model.cc:70–77  ·  view source on GitHub ↗

Gets a map from string node name to NodeDef.

Source from the content-addressed store, hash-verified

68
69// Gets a map from string node name to NodeDef.
70void GetNodeNameToNodeDefMap(
71 GraphDef* graph_def,
72 std::unordered_map<string, NodeDef*>* name_to_node_map) {
73 for (size_t i = 0; i < graph_def->node_size(); i++) {
74 NodeDef* node = graph_def->mutable_node(i);
75 (*name_to_node_map)[node->name()] = node;
76 }
77}
78
79// Strips off the tensor part of the tensor_name to get the node_name.
80const string GetNodeNameFromTensorName(string tensor_name) {

Callers 1

FreezeGraphDefFunction · 0.85

Calls 1

nameMethod · 0.65

Tested by

no test coverage detected