-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
40 lines (35 loc) · 1019 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
37
38
import os
class DefaultConfig():
### Path ###
# graph Path
output_path = "results/"
model_output = output_path + "model.weights/"
log_path = output_path + "logs/"
# preprocessed Data path
test_filename = "data/test_data"
train_filename = "data/train_data"
#word2vec_filename = "data/wikipedia-200-mincount-20-window-8-cbow.bin"
word2vec_filename = "data/wikipedia-100-mincount-30-window-8-cbow.bin"
# preprocessed Data file names
tags_filename = "data/tags.txt"
words_filename = "data/words.txt"
chars_filename = "data/chars.txt"
# preprocessed data variables
UNK = "$UNK$"
NUM = "$NUM$"
NONE = "O"
### Hyper parameters ###
BATCH_SIZE = 40
MAX_LENGTH_WORD = 50
N_EPOCHS = 50
LR = 0.001
LR_DECAY = 0.95
DROPOUT = 0.5
# Char Embedding (CNN)
CHAR_EMB_DIM = 120
FILTER_SIZE = [2, 3, 4, 5]
N_FILTERS = 128
# BiLSTM
HIDDEN_SIZE = 400
### Tensorflow op ###
NUM_THREADS = 4