def _preprocess_features(self, features): """ The propagation step is made here""" if self.normalize_features: features = row_normalize(features) for i in range(self.num_layers): features = self.graph_adj @ features return to_sparse_tensor(features)
def _preprocess_features(self, features): """ The propagation step is made here""" if self.normalize_features: features = row_normalize(features) initial_features = features.copy() alpha = np.float32(self.teleport_prob) for i in range(self.num_layers): features = ( 1 - alpha) * self.graph_adj @ features + alpha * initial_features return to_sparse_tensor(features)
def _preprocess_features(self, features): if self.normalize_features: features = row_normalize(features) return to_sparse_tensor(features)
def _preprocess_features(self, features): if self.normalize_features: features = row_normalize(features) return tf.constant(features.todense())