Esempio n. 1
0
 def test_ofg_nested(self):
     m = models.OfgNested()
     f = th.function(m.inputs, m.outputs)
     pdf = PyDotFormatter()
     graph = pdf(f)
     assert len(graph.get_nodes()) == 7
     assert len(graph.get_subgraph_list()) == 1
     ofg1 = graph.get_subgraph_list()[0]
     assert len(ofg1.get_nodes()) == 6
     assert len(ofg1.get_subgraph_list()) == 1
     ofg2 = ofg1.get_subgraph_list()[0]
     assert len(ofg2.get_nodes()) == 4
Esempio n. 2
0
 def test_ofg_nested(self):
     m = models.OfgNested()
     f = th.function(m.inputs, m.outputs)
     self.check(f)