-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
36 lines (34 loc) · 965 Bytes
/
config.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
from easydict import EasyDict as edict
config = edict()
config.embedding_size = 512
config.frequent = 200
config.verbose = 2000
config.data_shape = (3, 112, 112)
config.loss_s = 64.0
config.loss_m1 = 1.0
config.loss_m2 = 0.0
config.loss_m3 = 0.40
config.sample_ratio = 1.0
config.fp16 = False
config.rec_list = [
# '/anxiang/datasets/webface/'
# /root/xy/face/faces_emore
# /root/face_datasets/webface
]
config.momentum=0.9
config.weight_decay=5e-4
config.head_name = ['webface']
config.memory_lr_scale = 1.0
# config.num_classes = 10572
config.num_classes = 85742
config.batch_size = 64
config.max_update = 32000
config.lr =0.1
# webface[20,29],33
# emoreface['8,14'],16
def get_sub_class(rank,world_size):
config.num = config.num_classes//world_size + \
int(rank < config.num_classes % world_size)
config.s = config.num_classes//world_size*rank + \
min(rank, config.num_classes % world_size)
return config.s,config.num