-
Notifications
You must be signed in to change notification settings - Fork 0
/
fcn_bulk_imbalanced.py
40 lines (33 loc) · 962 Bytes
/
fcn_bulk_imbalanced.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
import logging
from shallow_collapse.bulk_runner import BulkImbalancedRunnerFCN
from shallow_collapse.utils import setup_runtime_context, parse_config
N = 2048
CLASS_SIZES_LIST = [
(512 * 2, 512 * 2),
(384 * 2, 640 * 2),
(256 * 2, 768 * 2),
(128 * 2, 896 * 2),
]
IN_FEATURES_LIST = [1, 2, 8, 32, 128]
REPEAT = 10
TAU = 1e-8
def main():
base_context = parse_config()
context = setup_runtime_context(context=base_context)
logging.basicConfig(
filename=context["results_file"],
filemode="a",
format="%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s",
level=logging.INFO,
)
logging.info("context: \n{}".format(context))
bulk_runner = BulkImbalancedRunnerFCN(context=context)
bulk_runner.run(
N=N,
CLASS_SIZES_LIST=CLASS_SIZES_LIST,
IN_FEATURES_LIST=IN_FEATURES_LIST,
REPEAT=REPEAT,
TAU=TAU,
)
if __name__ == "__main__":
main()