-
Notifications
You must be signed in to change notification settings - Fork 53
/
configuration.py
43 lines (36 loc) · 1.01 KB
/
configuration.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
class Config(object):
def __init__(self):
# Learning Rates
self.lr_backbone = 1e-5
self.lr = 1e-4
# Epochs
self.epochs = 30
self.lr_drop = 20
self.start_epoch = 0
self.weight_decay = 1e-4
# Backbone
self.backbone = 'resnet101'
self.position_embedding = 'sine'
self.dilation = True
# Basic
self.device = 'cuda'
self.seed = 42
self.batch_size = 32
self.num_workers = 8
self.checkpoint = './checkpoint.pth'
self.clip_max_norm = 0.1
# Transformer
self.hidden_dim = 256
self.pad_token_id = 0
self.max_position_embeddings = 128
self.layer_norm_eps = 1e-12
self.dropout = 0.1
self.vocab_size = 30522
self.enc_layers = 6
self.dec_layers = 6
self.dim_feedforward = 2048
self.nheads = 8
self.pre_norm = True
# Dataset
self.dir = '../coco'
self.limit = -1