MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_nodes

Function get_nodes

src/tf/tf_parser.cpp:167–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165static std::string get_name(const tensorflow::NodeDef& node) { return node.name(); }
166
167static tf_parser::node_map get_nodes(const tensorflow::GraphDef& graph,
168 std::vector<tensorflow::NodeDef>& input_nodes)
169{
170 tf_parser::node_map result;
171 for(auto&& node : graph.node())
172 {
173 auto node_name = get_name(node);
174 // assume each node in graph has an associated name
175 if(node_name.empty())
176 MIGRAPHX_THROW("tf node with no name found");
177 result[node_name] = node;
178 if(node.op() == "Placeholder")
179 {
180 input_nodes.push_back(node);
181 }
182 }
183 return result;
184}
185
186static tf_parser::attribute_map get_attributes(const tensorflow::NodeDef& node)
187{

Callers 1

parse_graphMethod · 0.85

Calls 4

get_nameFunction · 0.85
emptyMethod · 0.45
opMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected