-
Notifications
You must be signed in to change notification settings - Fork 0
/
configs.py
75 lines (68 loc) · 1.91 KB
/
configs.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
from utils import LayersHyperParameters
import torch
# The random seed for the experiment
seed = 877
def get_batch_size():
'''
Returns a batch size that is appropriate for the current GPU
'''
try:
_, total = torch.cuda.mem_get_info(0)
total = round(total/1024**3,1)
if (total >= 40):
return 100
elif (total >= 16):
return 32
else:
return 16
except Exception as e:
print(e)
return 16
data_set_config = {
"splits": {
"TEST_SPLIT": 0.05,
"VALIDATION_SPLIT": 0.1
},
"extensions": ["png"],
"preprocessed_data": False,
# can take either text_corruption or cutout_corruption
"transform": "text_corruption",
"paths": [
r"./Flicker_faces_128/random_text_20px",
r"./Flicker_faces_128/1_cutout_large_50px"
]
}
training_configs = {
"epochs": 12,
"LR": 1e-3,
"accelerator": "gpu"
}
experiments_config = {
"project": "ShCNN",
"experiments": [
{
"name": "small_b_3sl",
"batch_size": 128,
"layers": [
LayersHyperParameters("shepard", 8, 7),
LayersHyperParameters("shepard", 16, 5),
LayersHyperParameters("shepard", 32, 5),
LayersHyperParameters("conv", 64, 5),
LayersHyperParameters("conv", 128, 3),
LayersHyperParameters("conv", 128, 3),
LayersHyperParameters("conv", 3, 3),
]
},
{
"name": "base_model",
"batch_size": 250,
"layers": [
LayersHyperParameters("shepard", 8, 4),
LayersHyperParameters("shepard", 8, 4),
LayersHyperParameters("conv", 128, 9),
LayersHyperParameters("conv", 128, 1),
LayersHyperParameters("conv", 3, 8),
]
},
]
}