-
Notifications
You must be signed in to change notification settings - Fork 3
/
load_net.py
57 lines (44 loc) · 1.24 KB
/
load_net.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""
Utility file to select GraphNN model as
selected by the user
"""
from nets.gated_gcn_net import GatedGCNNet
from nets.gcn_net import GCNNet
from nets.gat_net import GATNet
from nets.graphsage_net import GraphSageNet
from nets.gin_net import GINNet
from nets.mo_net import MoNet as MoNet_
from nets.mlp_net import MLPNet
from nets.ring_gnn_net import RingGNNNet
from nets.three_wl_gnn_net import ThreeWLGNNNet
def GatedGCN(net_params):
return GatedGCNNet(net_params)
def GCN(net_params):
return GCNNet(net_params)
def GAT(net_params):
return GATNet(net_params)
def GraphSage(net_params):
return GraphSageNet(net_params)
def GIN(net_params):
return GINNet(net_params)
def MoNet(net_params):
return MoNet_(net_params)
def MLP(net_params):
return MLPNet(net_params)
def RingGNN(net_params):
return RingGNNNet(net_params)
def ThreeWLGNN(net_params):
return ThreeWLGNNNet(net_params)
def gnn_model(MODEL_NAME, net_params):
models = {
'GatedGCN': GatedGCN,
'GCN': GCN,
'GAT': GAT,
'GraphSage': GraphSage,
'GIN': GIN,
'MoNet': MoNet_,
'MLP': MLP,
'RingGNN': RingGNN,
'3WLGNN': ThreeWLGNN
}
return models[MODEL_NAME](net_params)