-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
25 lines (20 loc) · 1.1 KB
/
main.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
from datasets.base import DatasetBase
from algorithms.CHC_adaptive_search.chc import CHC
from algorithms.CHC_adaptive_search.chc_gallery import CHC_gallery
from configs import cfg
if __name__ == '__main__':
pen_based_recognition = DatasetBase(train_path='datasets/awl_face_reid/gallery.txt',
test_path='datasets/awl_face_reid/query.txt')
chc = CHC_gallery(n_generation=cfg['EVOLUTION']['n_generation'],
n_population=cfg['EVOLUTION']['n_population'],
divergence_rate=cfg['EVOLUTION']['divergence_rate'],
class_number=cfg['EVOLUTION']['class_number'],
limit_sample=cfg['EVOLUTION']['limit_sample'],
X_data=pen_based_recognition.train_X,
y_data=pen_based_recognition.train_y,
alpha=cfg['EVOLUTION']['alpha'])
chc.evolve()
# print(pen_based_recognition.train_X.shape)
# print(pen_based_recognition.train_y.shape)
# print(pen_based_recognition.test_X.shape)
# print(pen_based_recognition.test_y.shape)