(self, conv, dims,
fanouts, metapath,
node_pool=None,
graph_pool=Pooling,
add_self_loops=True,
jk_mode='concat')
| 28 | class GraphGNNNet(object): |
| 29 | |
| 30 | def __init__(self, conv, dims, |
| 31 | fanouts, metapath, |
| 32 | node_pool=None, |
| 33 | graph_pool=Pooling, |
| 34 | add_self_loops=True, |
| 35 | jk_mode='concat'): |
| 36 | conv_class = utils.get_conv_class(conv) |
| 37 | flow_class = utils.get_flow_class('whole') |
| 38 | self.whole_graph = True |
| 39 | self.convs = [] |
| 40 | for dim in dims[:-1]: |
| 41 | self.convs.append(self.get_conv(conv_class, dim)) |
| 42 | self.fc = tf.layers.Dense(dims[-1]) |
| 43 | self.sampler = flow_class(fanouts, [metapath[0]], add_self_loops) |
| 44 | assert jk_mode in ['concat', 'maxpool'] |
| 45 | self.jk_mode = jk_mode |
| 46 | if node_pool is not None: |
| 47 | self.node_pool = [self.get_node_pool(node_pool) |
| 48 | for i in range(len(self.convs) // 2 + 1)] |
| 49 | else: |
| 50 | self.node_pool = None |
| 51 | self.graph_pool = self.get_graph_pool(graph_pool) |
| 52 | |
| 53 | def get_node_pool(self, node_pool): |
| 54 | raise NotImplementedError |
nothing calls this directly
no test coverage detected