コード例 #1
0
ファイル: fastgcn.py プロジェクト: zhonghuatuzi/GraphGallery
    def process_step(self):
        graph = self.graph
        adj_matrix = self.adj_transform(graph.adj_matrix)
        attr_matrix = self.attr_transform(graph.attr_matrix)

        attr_matrix = adj_matrix @ attr_matrix

        self.feature_inputs, self.structure_inputs = T.astensor(
            attr_matrix, device=self.device), adj_matrix
コード例 #2
0
 def train_sequence(self, index):
     index = T.astensor(index)
     labels = self.graph.labels[index]
     
     if self.kind == "T":
         feature_inputs = tf.gather(self.feature_inputs, index)
     else:
         feature_inputs = self.feature_inputs[index]
     sequence = FullBatchNodeSequence(feature_inputs, labels, device=self.device)
     return sequence