示例#1
0
 def _build(self, graph: GraphsTuple, num_processing_steps):
     # give edges and globals to graph from nodes
     graph = self._first_block(graph)
     output = []
     for i in range(num_processing_steps):
         graph = self._message_passing_graph(graph)
         graph = graph._replace(globals=self._global_block(graph).globals +
                                graph.globals)
         output.append(graph)
     return output
示例#2
0
 def _build(self, graph: GraphsTuple, positions: GraphsTuple,
            num_processing_steps):
     # give edges and globals to graph from nodes
     graph = self._first_block(graph)
     outputs = []
     for i in range(num_processing_steps):
         graph = graph._replace(
             nodes=tf.concat([positions.nodes, graph.nodes], axis=-1))
         graph = self._message_passing_graph(graph)
         outputs.append(self._property_block(graph))
     return outputs