-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
108 lines (94 loc) · 2.05 KB
/
config.py
File metadata and controls
108 lines (94 loc) · 2.05 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
from sacred import Experiment
ex = Experiment('Image Hashing')
@ex.config
def config():
dataset = 'flickr'
nclass = 24
hash_bit = 32
batch_size = 32
logfile_path = './tensorboard_logs'
checkpoint_path = './checkpoints'
save_best_log = './best_log/best.log'
proxyinfo_path = None
method = 'umrch'
backbone = 'clip'
backbone_frozen = True
comment = 'default'
device = 'cuda:0'
epochs = 40
lr = 0.0001
eval_interval = 1
contrastive = False
#+++++++++
T = 0.01
th = 0.4 # <= 0.4
temperature = 1
alpha = 1
beta = 1
lr_strategy = None
aggregation = 0
neg_th = 0
#+++++++++++++++++++++++++++++++++++
iscode = True
@ex.named_config
def no_ckpt():
checkpoint_path = None
@ex.named_config
def flickr():
dataset ='flickr'
nclass = 24
@ex.named_config
def coco2014():
dataset = 'coco2014'
eval_interval = 2
nclass = 80
@ex.named_config
def nuswide():
dataset = 'nuswide1'
eval_interval = 2
nclass = 21
@ex.named_config
def nuswide1():
dataset = 'nuswide1'
eval_interval = 2
nclass = 21
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ex.named_config
def umrch():
method = 'umrch'
backbone = 'clip'
backbone_frozen = True
lr = 0.005
batch_size = 32
epochs = 100
contrastive = True
save_best_log = './best_log/umrch.log'
logfile_path = './tensorboard_logs/umrch'
checkpoint_path = './checkpoints/umrch'
T = 0.01
th = 0.3 # <= 0.4
temperature = 1
alpha = 1
beta = 150
lr_strategy = "onecyclelr"
aggregation = 0
neg_th = 0
@ex.named_config
def cliph():
method = 'cliph'
backbone = 'clip'
backbone_frozen = True
lr = 0.1
batch_size = 32
epochs = 70
save_best_log = './best_log/cliph.log'
logfile_path = './tensorboard_logs/cliph'
checkpoint_path = './checkpoints/cliph'
T = 0.01
th = 0.4 # <= 0.4
temperature = 1
alpha = 1
beta = 1
lr_strategy = "onecyclelr"
aggregation = 0
neg_th = 0.2