-
Notifications
You must be signed in to change notification settings - Fork 129
/
settings.py
39 lines (31 loc) · 937 Bytes
/
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
base_architecture = 'vgg19'
img_size = 224
prototype_shape = (2000, 128, 1, 1)
num_classes = 200
prototype_activation_function = 'log'
add_on_layers_type = 'regular'
experiment_run = '003'
data_path = './datasets/cub200_cropped/'
train_dir = data_path + 'train_cropped_augmented/'
test_dir = data_path + 'test_cropped/'
train_push_dir = data_path + 'train_cropped/'
train_batch_size = 80
test_batch_size = 100
train_push_batch_size = 75
joint_optimizer_lrs = {'features': 1e-4,
'add_on_layers': 3e-3,
'prototype_vectors': 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,
'clst': 0.8,
'sep': -0.08,
'l1': 1e-4,
}
num_train_epochs = 1000
num_warm_epochs = 5
push_start = 10
push_epochs = [i for i in range(num_train_epochs) if i % 10 == 0]