def test_dependency(self):
two_towers = """{
"name" : "test",
"layers" : {
"data": {
"parents": []
},
"conv1": {
"parents": ["data"]
},
"conv2": {
"parents": ["data"]
},
"output": {
"parents" : ["conv1", "conv2"]
}
}
}
"""
self.graph.load_from_string(two_towers)
nested_list = self._to_strings(self.graph.nested_list)
self.assertEqual(nested_list[0], 'data')
six.assertCountEqual(self, nested_list[1], (['conv1'], ['conv2']))
self.assertEqual(nested_list[2], 'output')
评论列表
文章目录