-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
57 lines (51 loc) · 1.29 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'''
* @author Waldinsamkeit
* @email Zenglz_pro@163.com
* @create date 2020-10-28 16:39:46
* @desc
'''
import os
from pathlib import Path
cwd = Path.cwd()
""" ------------- Path Config ------------- """
NYT_DIR_PATH = Path.joinpath(cwd,'data','NYT')
PubMed_DIR_PATH = Path.joinpath(cwd, 'data', 'PubMed')
Wiki_DIR_PATH = Path.joinpath(cwd, 'data', 'Wiki')
""" ---------------- Own Config ----------- """
#default training Config
TrainingConfig ={
'loss_fn' : 'crossEntropy',
'threshold' : 0.5,
'epoch' : 100,
'checkpoint_epoch' : 5,
'print_step' : 15,
'lr' : 1e-4,
'checkpoint_dir' : cwd.joinpath('checkpoint'),
'batch_size' : 32,
'result_out_dir' : cwd.joinpath('result'),
'cuda': 'cuda:0'
}
#default Operate Config
OperateConfig = {
'resume': False,
'train' : True,
'test' : True,
'predict' : True,
'eval_function':['ARI','NMI','FMI']
}
#default dataconfig
DataConfig = {
'data_dir_path' : None,
'sample_strategy' : 'sample_size_repeat_size',
'negative_sample_size' : 20,
'test_negative_sample_size' : 10,
'word_emb_select': 'combined.embed'
}
#default modelconfig
ModelConfig = {
'name' : 'SynSetMine',
'version' : 'v1.0.0',
'embed_trans_hidden_size' : 250,
'post_trans_hidden_size' : 500,
'dropout' : 0.3
}