| 186 | } |
| 187 | |
| 188 | int GrapplerTest::CountOpNodes(const GraphDef& graph, const string& op) { |
| 189 | return std::count_if(graph.node().begin(), graph.node().end(), |
| 190 | [&op](const NodeDef& node) { return node.op() == op; }); |
| 191 | } |
| 192 | |
| 193 | } // namespace grappler |
| 194 | } // namespace tensorflow |