def test_ofg(self):
     m = models.Ofg()
     f = th.function(m.inputs, m.outputs)
     pdf = PyDotFormatter()
     graph = pdf(f)
     assert len(graph.get_nodes()) == 10
     sub_graphs = graph.get_subgraph_list()
     assert len(sub_graphs) == 2
     ofg1, ofg2 = sub_graphs
     assert len(ofg1.get_nodes()) == 5
     assert len(ofg1.get_nodes()) == len(ofg2.get_nodes())
Exemple #2
0
 def test_ofg(self):
     m = models.Ofg()
     f = th.function(m.inputs, m.outputs)
     self.check(f)