-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_pbt.py
81 lines (79 loc) · 2.44 KB
/
config_pbt.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
from ray import tune
from ray.tune.schedulers import PopulationBasedTraining
######## PBT Scheduler ##################
scheduler_p = PopulationBasedTraining(
perturbation_interval=4,
hyperparam_mutations={
"lr": tune.loguniform(1e-4, 1e-1),
"mm":[0.6,0.9,1.2],
"dp":[0,0.9,0.995],
"wD":[0.000008,0.00001,0.00003 ],
"batch_size": [32, 48, 96]
},
metric="loss",
mode="min"
)
config_inc_pbt = {
"lr": 1e-4,
"mm": 0.6,
"dp":0,
"wD": 0.000008,
"depth":tune.choice([1,2,3]),
"actvn":tune.choice(['relu','leaky_relu','selu','linear','tanh']),
"batch_size": 64,
"opt": tune.choice(['adam','sgd', 'adadelta']),
"b1": 0.9,
"b2": tune.choice([0.999]),
"eps":tune.loguniform(1e-08 ,1e-04),
"rho":tune.choice([0.9])
}
config_alex_pbt = {
"lr": 1e-4,
"mm": 0.6,
"dp":0,
"wD": 0.000008,
#"depth":tune.choice([1,2,3]),
"actvn":tune.choice(['relu','leaky_relu','selu','linear','tanh']),
"batch_size": 64,
"opt": tune.choice(['adam','sgd', 'adadelta']),
"b1": 0.9,
"b2": 0.999,
"eps":tune.loguniform(1e-08 ,1e-04),
"rho":0.9
}
config_vgg_pbt = {
"lr": 1e-4,
"mm": 0.6,
"dp":0,
"wD": 0.000008,
"vgg_config":tune.choice(['A','B','D','E']),
"actvn":tune.choice(['relu','leaky_relu','selu','linear','tanh']),
"batch_size": 64,
"opt": tune.choice(['adam','sgd', 'adadelta']),
"b1": 0.9,
"b2": 0.999,
"eps":tune.loguniform(1e-08 ,1e-04),
"rho":0.9,
"batch_norm": tune.choice([True,False]),
}
config_res_pbt = {
"lr": 1e-4,
"mm": 0.6,
"dp":0,
"wD": 0.000008,
"bloc_1":tune.choice([64,128,256,512]),
"bloc_2":tune.choice([64,128,256,512]),
"bloc_3":tune.choice([64,128,256,512]),
"bloc_4":tune.choice([64,128,256,512]),
"depth_1":tune.choice([1,2]),
"depth_2":tune.choice([1,2,0]),
"depth_3":tune.choice([1,2,0]),
"depth_4":0,#tune.choice([1,2,0]),
"actvn":tune.choice(['relu','leaky_relu','selu','linear','tanh']),
"batch_size": 64,
"opt": tune.choice(['adam','sgd', 'adadelta']),
"b1": 0.9,
"b2": 0.999,
"eps":tune.loguniform(1e-08 ,1e-04),
"rho":0.9
}