(self)
| 153 | ng.render(nn.dataFlow) |
| 154 | |
| 155 | def test_match_graph_node(self): |
| 156 | mg = ng.NNMatchGraph() |
| 157 | mg.createNode(ng.NeuralNetOperator("test")) |
| 158 | nn = ng.NNModule() |
| 159 | test = nn.dataFlow.createNode(ng.NeuralNetOperator("test")) |
| 160 | x = nn.dataFlow.createNode(ng.NeuralNetData("X")) |
| 161 | nn.dataFlow.createEdge(x, test) |
| 162 | |
| 163 | count = 0 |
| 164 | for match in nn.match(mg): |
| 165 | assert len(match) == 1 |
| 166 | count += 1 |
| 167 | # Dot generation of subgraph |
| 168 | assert(str(match).startswith("digraph G")) |
| 169 | assert count == 1 |
| 170 | |
| 171 | def test_match_graph_node_strict(self): |
| 172 | mg = ng.NNMatchGraph() |
nothing calls this directly
no test coverage detected