-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
52 lines (34 loc) · 1.12 KB
/
Copy pathsettings.py
File metadata and controls
52 lines (34 loc) · 1.12 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
img_size = 224
num_classes = 200
prototype_shape = (num_classes*10, 64, 1, 1)
prototype_activation_function = 'log'
add_on_layers_type = 'regular'
data_path = '/mnt/c/copy/data/CUB_200_2011_full/'
train_dir = data_path + 'train/'
test_dir = data_path + 'test/'
train_push_dir = data_path + 'train'
data_path_ood1 = '/mnt/c/copy/data/Cars_full/'
test_dir_ood1 = data_path_ood1 + 'traintest/'
data_path_ood2 = '/mnt/c/copy/data/Pets_full/'
test_dir_ood2 = data_path_ood2 + 'traintest/'
train_batch_size = 80 # 80
test_batch_size = 80
train_push_batch_size = 80
joint_optimizer_lrs = {'features': 1e-4,
'add_on_layers': 3e-3,
'prototype_vectors': 3e-3} # 3e-3
joint_lr_step_size = 5
warm_optimizer_lrs = {'add_on_layers': 3e-3,
'prototype_vectors': 3e-3}
last_layer_optimizer_lr = 1e-4
coefs = {
'crs_ent': 1,
'mine': 0.2,
'aux': 0.5,
}
num_train_epochs = 120 # 180
num_warm_epochs = 0
mine_start = 40 # 10 (R50)
updateGMM_start = 35 # 10 (R50)
push_start = 100 # 100
push_epochs = [i for i in range(num_train_epochs) if i % 10 == 0]