(self, group_n_id)
| 81 | return conv(inputs, edge_index, size=size, edge_attr=edge_attr, edge_weight=edge_weight) |
| 82 | |
| 83 | def __call__(self, group_n_id): |
| 84 | group_x = [] |
| 85 | for sampler, n_id in zip(self.group_sampler, group_n_id): |
| 86 | data_flow = sampler(n_id) |
| 87 | num_layers = len(self.convs) |
| 88 | x = self.to_x(data_flow[0].n_id) |
| 89 | for i, conv, block in zip(range(num_layers), self.convs, data_flow): |
| 90 | if block.e_id is None: |
| 91 | edge_attr = None |
| 92 | else: |
| 93 | edge_attr = self.get_edge_attr(block) |
| 94 | if block.edge_weight is None: |
| 95 | edge_weight = None |
| 96 | else: |
| 97 | edge_weight = block.edge_weight |
| 98 | x_src = mp_ops.gather(x, block.res_n_id) |
| 99 | x_dst = x |
| 100 | x = self.calculate_conv(conv, |
| 101 | (x_src, x_dst), |
| 102 | block.edge_index, |
| 103 | size=block.size, |
| 104 | edge_attr=edge_attr, |
| 105 | edge_weight=edge_weight) |
| 106 | x = tf.nn.relu(x) |
| 107 | x = self.fc(x) |
| 108 | group_x.append(x) |
| 109 | return group_x |
| 110 | |
| 111 | class SingleGNNNet(BaseGNNNet): |
| 112 | def __init__(self, conv, flow, dims, fanouts, metapath, encoder, add_self_loops=False): |
nothing calls this directly
no test coverage detected