forked from kaniblu/pytorch-bilstmcrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (58 loc) · 1.68 KB
/
Makefile
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
57
58
59
60
61
62
63
vocabs:
python -m utils.vocab --data_dir sents.txt --vocab_path vocab-sents.pkl --cutoff 30000
python -m utils.vocab --data_dir labels.txt --vocab_path vocab-labels.pkl --cutoff 30000
python -m utils.vocab --data_dir sents_val.txt --vocab_path vocab-sents-val.pkl --cutoff 30000
python -m utils.vocab --data_dir labels_val.txt --vocab_path vocab-labels-val.pkl --cutoff 30000
train:
python train.py \
--feats_path sents.txt \
--feats_vocab vocab-sents.pkl \
--labels_path labels.txt \
--labels_vocab vocab-labels.pkl \
--hidden_dim=128 \
--save_dir=foo \
--word_dim=256 \
--wordembed_type=none \
--wordembed_path=./ \
--wordembed_freeze=False \
--config=conf.yml \
--batch_size=32 \
--save \
--save_period 10 \
--n_epochs 30 \
--gpu
train_with_fasttext:
python train.py \
--feats_path sents.txt \
--feats_vocab vocab-sents-w-unlabelled.pkl \
--labels_path labels.txt \
--labels_vocab vocab-labels-w-unlabelled.pkl \
--hidden_dim=128 \
--save_dir=foo \
--word_dim=300 \
--wordembed_type=fasttext \
--fasttext_path=$(HOME)/Code/fastText/fasttext \
--wordembed_path=./embeddings/wiki.de.bin \
--wordembed_freeze=False \
--config=conf.yml \
--batch_size=32 \
--save \
--save_period 10 \
--n_epochs 30 \
--gpu \
--val \
--val_period 10 \
--val_feats_path sents_val_w_unlabelled.txt \
--val_labels_path labels_val_w_unlabelled.txt \
--text_preview
predict:
python predict.py \
--ckpt_path foo/20170922-172008-main/model-37833-0.6629 \
--feats_path sents.txt \
--feats_vocab vocab-sents.pkl \
--labels_vocab vocab-labels.pkl \
--word_dim=256 \
--hidden_dim=128 \
--save_dir ./output
start_visdom:
python -m visdom.server