forked from graphdeeplearning/benchmarking-gnns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load_net.py
56 lines (44 loc) · 1.48 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
"""
Utility file to select GraphNN model as
selected by the user
"""
from nets.molecules_graph_regression.gated_gcn_net import GatedGCNNet
from nets.molecules_graph_regression.gcn_net import GCNNet
from nets.molecules_graph_regression.gat_net import GATNet
from nets.molecules_graph_regression.graphsage_net import GraphSageNet
from nets.molecules_graph_regression.gin_net import GINNet
from nets.molecules_graph_regression.mo_net import MoNet as MoNet_
from nets.molecules_graph_regression.mlp_net import MLPNet
from nets.molecules_graph_regression.ring_gnn_net import RingGNNNet
from nets.molecules_graph_regression.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)