-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
54 lines (42 loc) · 1.24 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
import torch.nn as nn
class ConfigMain:
DATA_FRAME = 'MORTALITY_TRAIN.csv'
MAX_LEN = 96
TRAIN_RATIO = 0.75
TEXT_FEATURE = 'TEXT'
MODEL_NAME = 'ACRCNN'
MODELS_PATH = './/trained_models//' + MODEL_NAME + '//'
EMBEDDINGS_VERSION = 'biobert_v1.1_pubmed'
EMBEDDINGS_PATH = 'monologg/biobert_v1.1_pubmed'
'''
The possible values are : train_primary, train_sub, train_primary_sub, test
'''
TASK_TYPE = "test"
class ConfigPrimary:
LOSS_FUNCTION = nn.NLLLoss()
LABELS_NUM = 5
DROPOUT = 0.0
EPOCHS_NUM = 4
THRESHOLD = 0.6
HIDDEN_DIM_LSTM_val = 150
HIDDEN_DIM_LSTM = [100, 250, 16]
LINEAR_OUTPUT_DIM_val = 250
LINEAR_OUTPUT_DIM = [150, 350, 21]
LEARNING_RATE_val = 0.05
LEARNING_RATE = [0.06, 0.15, 10]
BATCH_SIZE_VAL = 32
BATCH_SIZE = [48, 96, 7]
MOMENTUM_val = 0.3
MOMENTUM = [0, 0.9, 10]
class ConfigSubModel:
LOSS_FUNCTION = nn.NLLLoss()
LABELS_NUM = 2
DROPOUT = 0.0
HIDDEN_DIM_LSTM = [100, 250, 16]
LINEAR_OUTPUT_DIM = [200, 350, 16]
LEARNING_RATE = [0.01, 0.15, 15]
EPOCHS_NUM = 5
BATCH_SIZE = 32
MOMENTUM = [0, 0.9, 10]
THRESHOLD = 0
BATCH_SIZE_VAL = 32