-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_jup.py
More file actions
149 lines (125 loc) · 3.32 KB
/
Copy pathconfig_jup.py
File metadata and controls
149 lines (125 loc) · 3.32 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import argparse
def base_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
"--framework",
type=str,
default='CL',
help="Framework to evaluate [CL]",
)
parser.add_argument(
"--dir_data",
type=str,
default='./data/',
help="Directory to save the datasets",
)
parser.add_argument(
"--dir_output",
type=str,
default='./output/',
help="Directory to save the output",
)
parser.add_argument(
"--dataset_name",
type=str,
default='cifar10',
help="Name of the dataset",
)
parser.add_argument(
"--model_name",
type=str,
default='default',
help="Model architecture [mlp, resnet, default]",
)
parser.add_argument(
"--batch_size",
type=int,
default=10,
help="Batch size",
)
parser.add_argument(
"--lr",
type=float,
default=0.1,
help="Learning rate",
)
parser.add_argument(
"--optimizer",
type=str,
default='sgd',
help="Optimizer [sgd, adam]",
)
parser.add_argument(
"--local_epochs",
type=int,
default=1,
help="Number of epochs at batch-level (multiple gradient updates per batch)",
)
parser.add_argument(
"--n_runs",
type=int,
default=3,
help="Number of runs for each experiment",
)
parser.add_argument(
"--n_tasks",
type=int,
default=-1,
help="Number of tasks (-1 default number of tasks for each dataset)"
)
parser.add_argument(
"--with_memory",
type=int,
default=1,
help="Use of episodic memory [0 (no), 1 (yes)]",
)
parser.add_argument(
"--memory_size",
type=int,
default=500,
help="Size of episodic memory [200, 500, 1000]",
)
parser.add_argument(
"--update_strategy",
type=str,
default='balanced',
help="Memory update strategy [reservoir, balanced]",
)
parser.add_argument(
"--sampling_strategy",
type=str,
default='random',
help="Memory sampling strategy [random, uncertainty]",
)
parser.add_argument(
"--balanced_update",
type=str,
default='uncertainty',
help="Update strategy for class-balanced memory management [random, uncertainty]",
)
parser.add_argument(
"--uncertainty_score",
type=str,
default='bregman',
help="Uncertainty metric for uncertainty management (bregman, confidence, margin, entropy, rainbow)",
)
parser.add_argument(
"--subsample_size",
type=int,
default=50,
help="Size of the subsample (taken from the memory for replay) for computing the uncertainty scores when sampling from the memory",
)
parser.add_argument(
"--balanced_step",
type=str,
default='bottomk',
help="Sampling strategy for uncertainty-based class-balanced memory management (step (step-sized), topk (top-k), bottomk (bottom-k))",
)
parser.add_argument(
"--n_clients",
type=int,
default=1,
help="Number of clients",
)
args = parser.parse_args('')
return args