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

Method get_edge_attr

tf_euler/python/mp_utils/group_gnn.py:66–77  ·  view source on GitHub ↗
(self, block)

Source from the content-addressed store, hash-verified

64 return e_id
65
66 def get_edge_attr(self, block):
67 n_id_dst = tf.cast(tf.expand_dims(block.n_id, -1),
68 dtype=tf.float32)
69 n_id_src= mp_ops.gather(n_id_dst, block.res_n_id)
70 n_id_src = mp_ops.gather(n_id_src,
71 block.edge_index[0])
72 n_id_dst = mp_ops.gather(n_id_dst,
73 block.edge_index[1])
74 n_id_src = tf.cast(tf.squeeze(n_id_src, -1), dtype=tf.int64)
75 n_id_dst = tf.cast(tf.squeeze(n_id_dst, -1), dtype=tf.int64)
76 edge_attr = self.to_edge(n_id_src, n_id_dst, block.e_id)
77 return edge_attr
78
79 def calculate_conv(self, conv, inputs, edge_index,
80 size=None, edge_attr=None, edge_weight=None):

Callers 1

__call__Method · 0.95

Calls 1

to_edgeMethod · 0.95

Tested by

no test coverage detected