-
Notifications
You must be signed in to change notification settings - Fork 4
/
parser.py
85 lines (67 loc) · 2.89 KB
/
parser.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import argparse
def parameter_parser():
"""
A method to parse up command line parameters.
"""
parser = argparse.ArgumentParser(description="Run the code.")
parser.add_argument('--seed',
type=int,
default=2020,
help='Random seed')
parser.add_argument("--dataset",
nargs="?",
default="AIDS700nef",
help="Dataset name. reg: AIDS700nef/LINUX/IMDBMulti and cls: ffmpeg_min3/20/50, openssl_min3/20/50")
parser.add_argument("--epochs",
type=int,
default=10000,
help="Number of training epochs. Default is 10000.")
parser.add_argument("--nhid",
type=int,
default=100,
help="Hidden dimension in convolution. Default is 64.")
parser.add_argument("--batch-size",
type=int,
default=512,
help="Number of graph pairs per batch. Default is 128.")
parser.add_argument("--dropout",
type=float,
default=0.0,
help="Dropout probability. Default is 0.0.")
parser.add_argument("--learning-rate",
type=float,
default=0.0001,
help="Learning rate. Default is 0.0001.")
parser.add_argument("--ratio1",
type=float,
default=1.0,
help="Pooling rate. Default is 0.8.")
parser.add_argument("--ratio2",
type=float,
default=1.0,
help="Pooling rate. Default is 0.8.")
parser.add_argument("--ratio3",
type=float,
default=0.8,
help="Pooling rate. Default is 0.8.")
parser.add_argument("--weight-decay",
type=float,
default=5e-4,
help="Adam weight decay. Default is 5*10^-4.")
parser.add_argument('--device',
type=str,
default='cuda:0',
help='Specify cuda devices')
parser.add_argument('--mode',
type=str,
default='RW',
help='Specify hypergraph construction mode NEighbor(NE)/RandomWalk(RW)')
parser.add_argument('--patience',
type=int,
default=100,
help='Patience for early stopping')
parser.add_argument('--k',
type=int,
default=5,
help='Hyperparameter for construction hyperedge')
return parser.parse_args()