(self)
| 207 | assert count == 1 |
| 208 | |
| 209 | def test_delete_subgraph(self): |
| 210 | mg = ng.NNMatchGraph() |
| 211 | test2m = mg.createNode(ng.NeuralNetOperator("test2"), strict=True) |
| 212 | xm = mg.createNode(ng.NeuralNetData("X"), strict=True) |
| 213 | testm = mg.createNode(ng.NeuralNetOperator("test")) |
| 214 | mg.createEdge(test2m, xm) |
| 215 | mg.createEdge(xm, testm) |
| 216 | |
| 217 | nn = ng.NNModule() |
| 218 | test2 = nn.dataFlow.createNode(ng.NeuralNetOperator("test2")) |
| 219 | x = nn.dataFlow.createNode(ng.NeuralNetData("X")) |
| 220 | test = nn.dataFlow.createNode(ng.NeuralNetOperator("test")) |
| 221 | nn.dataFlow.createEdge(test2, x) |
| 222 | nn.dataFlow.createEdge(x, test) |
| 223 | |
| 224 | for m in nn.match(mg): |
| 225 | match = m |
| 226 | nn.deleteSubgraph(match) |
| 227 | assert len(nn.controlFlow) == 0 |
| 228 | |
| 229 | def test_replace_subraph(self): |
| 230 | mg = ng.NNMatchGraph() |
nothing calls this directly
no test coverage detected