| 165 | static std::string get_name(const tensorflow::NodeDef& node) { return node.name(); } |
| 166 | |
| 167 | static 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 | |
| 186 | static tf_parser::attribute_map get_attributes(const tensorflow::NodeDef& node) |
| 187 | { |
no test coverage detected