| 35 | raise ValueError('Metapath should be the same in whole graph sampler.') |
| 36 | |
| 37 | def get_self_neighbors(self, n_id): |
| 38 | edge_src = [] |
| 39 | edge_dst = [] |
| 40 | n_id = tf.reshape(n_id, [-1]) |
| 41 | one_neighbor = tf_euler.sparse_get_adj(n_id, n_id, |
| 42 | self.neighbor_type, -1, -1) |
| 43 | one_src = one_neighbor.indices[:, 0] |
| 44 | one_dst = one_neighbor.indices[:, 1] |
| 45 | edge_src = tf.cast(one_src, tf.int32) |
| 46 | edge_dst = tf.cast(one_dst, tf.int32) |
| 47 | return edge_src, edge_dst |
| 48 | |
| 49 | def produce_subgraph(self, n_id): |
| 50 | inv = tf.range(tf.size(n_id)) |