-
Notifications
You must be signed in to change notification settings - Fork 0
/
global_settings.py
53 lines (39 loc) · 1.13 KB
/
global_settings.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
# hyperparameter for Reinforcement Learning
RL_STEP_LENGTH = 0.1
RL_PRUNE_FILTER_NOISE_VAR = 0.04
RL_FLOP_COEF = 0
RL_PARA_COEF = 0
RL_PPO_CLIP = 0.25
RL_PPO_ENABLE = True
RL_PROBABILITY_LOWER_BOUND = 1e-5
RL_EXPLORE_STRATEGY = "cosine"
RL_GREEDY_EPSILON = 0.4
RL_SAMPLE_STEP = 1
RL_SAMPLE_NUM = 10
RL_DISCOUNT_FACTOR = 0.9
RL_LR_EPOCH = 10
# hyperparameter for dataset
D_MNIST_TRAIN_MEAN = (0.1307, )
D_MNIST_TRAIN_STD = (0.3081, )
D_CIFAR10_TRAIN_MEAN = (0.49139968, 0.48215827, 0.44653124)
D_CIFAR10_TRAIN_STD = (0.24703233, 0.24348505, 0.26158768)
D_CIFAR100_TRAIN_MEAN = (0.5070751592371323, 0.48654887331495095, 0.4409178433670343)
D_CIFAR100_TRAIN_STD = (0.2673342858792401, 0.2564384629170883, 0.27615047132568404)
D_VAL_PROPORTION = 0
# hyperparameter for training
T_EPOCH = 250
T_LR_SCHEDULER_INITIAL_LR = 1e-1
T_LR_SCHEDULER_MIN_LR = 1e-6
T_WARMUP_RATIO = 0.1
T_PT_PERIOD = 1
T_PT_EPOCH = 20
T_PT_LR_SCHEDULER_INITIAL_LR = 1e-3
T_PT_STU_CO = 0.25
T_PT_TEMPERATURE = 2
T_BATCH_SIZE = 256
T_NUM_WORKER = 8
# hyperparameter for compressing
C_SPARSITY = 0.80
C_PRUNE_STRATEGY = "taylor"
C_PRUNE_FILTER_RATIO = 0.01
C_CALIBRATION_NUM = 100