MCPcopy Create free account
hub / github.com/alibaba/euler / get_self_neighbors

Method get_self_neighbors

tf_euler/python/dataflow/whole_dataflow.py:37–47  ·  view source on GitHub ↗
(self, n_id)

Source from the content-addressed store, hash-verified

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))

Callers 1

produce_subgraphMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected