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