forked from KisuYang/EmotionX-KU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhparams.py
40 lines (33 loc) · 862 Bytes
/
hparams.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
from collections import defaultdict
EMOTIONX_MODEL_HPARAMS = defaultdict(
description='base',
model_name='base_max_both_em',
fr_test_path='./data/friends_test.json',
fr_train_path='./data/friends_train.json',
em_test_path='./data/emotionpush_test.json',
em_train_path='./data/emotionpush_train.json',
save_dir='./saves/',
log_dir='./logs/',
log_micro_f1='micro_f1',
log_wce_loss='train_loss',
# bert
bert_type='bert-base-uncased', # we used post-trained model instead of this.
posttrained_model_path='',
max_input_len=512,
cls_token='[CLS]',
sep_token='[SEP]',
pad_token='[PAD]',
cls_id=101,
sep_id=102,
pad_id=0,
# classifier
hidden_size=768,
inter_hidden_size=384,
n_class=4+1, # neutral, joy, sadness, anger + OOD
# train
n_epoch=10,
batch_size=1,
learning_rate=2e-5,
dropout=0.1,
clip=5,
)