(self, n_id, graph_index)
| 83 | return conv(inputs, edge_index, size=size, edge_attr=edge_attr) |
| 84 | |
| 85 | def __call__(self, n_id, graph_index): |
| 86 | data_flow = self.sampler(n_id) |
| 87 | num_layers = len(self.convs) |
| 88 | jk_hidden = [] |
| 89 | x = self.to_x(data_flow[0].n_id) |
| 90 | block = data_flow[0] |
| 91 | e_id, edge_index, size = block.e_id, block.edge_index, block.size |
| 92 | for i, conv in zip(range(num_layers), self.convs): |
| 93 | if e_id is None: |
| 94 | edge_attr = None |
| 95 | else: |
| 96 | edge_attr = self.get_edge_attr(block) |
| 97 | x_src, x_dst = x, None |
| 98 | x = self.calculate_conv(conv, |
| 99 | [x_src, x_dst], |
| 100 | edge_index, |
| 101 | size=size, |
| 102 | edge_attr=edge_attr) |
| 103 | x = tf.nn.relu(x) |
| 104 | pool_out = self.graph_pool(x, graph_index) |
| 105 | jk_hidden.append(pool_out) |
| 106 | if self.node_pool is not None: |
| 107 | if i % 2 == 0 and i != 0: |
| 108 | pool = self.node_pool[i // 2] |
| 109 | x, edge_index, _, graph_index, _, _ ,size = \ |
| 110 | pool(x, edge_index, graph_index, size) |
| 111 | if self.jk_mode == 'concat': |
| 112 | pool_out = tf.concat(jk_hidden, axis=1) |
| 113 | elif self.jk_mode == 'maxpool': |
| 114 | pool_out = tf.reduce_sum(tf.stack(jk_hidden, 1), 1) |
| 115 | out = self.fc(pool_out) |
| 116 | return out |
| 117 |
nothing calls this directly
no test coverage detected