Esempio n. 1
0
 def __init__(self, primitives, dump_graph):
     ErrorHandler.is_list(primitives)
     self.graph = graph.Graph()
     # [1] Create nodes.
     self.__create_nodes(primitives)
     # [2] Connect nodes.
     self.graph.make_connections()
     # [3] Mark inputs and outputs nodes
     self.graph.set_inputs_and_outputs()
     # [4] Calc DFS (execution order)
     self.graph.calc_dfs()
     if dump_graph is True:
         self.__dump_graph()
Esempio n. 2
0
 def __init__(self, id, inputs, axis=0):
     ErrorHandler.is_list(inputs)
     ErrorHandler.is_type_generic(axis, int)
     super().__init__(id, inputs)
     self.axis = axis
Esempio n. 3
0
 def __init__(self, id, inputs):
     ErrorHandler.is_string(id)
     ErrorHandler.is_list(inputs)
     self.id = id
     self.inputs = inputs