-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_train_jp.sh
More file actions
29 lines (22 loc) · 906 Bytes
/
Copy pathrun_train_jp.sh
File metadata and controls
29 lines (22 loc) · 906 Bytes
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
BATCH_SIZE=32
TEXT_LENGTH=256
EPOCH=2
MECAB_DICT_DIR=`mecab-config --dicdir`
MECAB_OPT=""
if [ -x ${MECAB_DICT_DIR}/mecab-ipadic-neologd ]; then
MECAB_OPT="--mecab_dict ${MECAB_DICT_DIR}/mecab-ipadic-neologd"
fi
# remove comment if require Japanese text normalization.
# DO_NORMALIZE='--normalize_text'
MODEL_DIR=./models/Japanese_L-12_H-768_A-12_E-30_BPE
CONF_FILE=${MODEL_DIR}/bert_config.json
BASE_MODEL=${MODEL_DIR}/pytorch_model.bin
VOCAB_FILE=${MODEL_DIR}/vocab.txt
TRAIN_TSV=./data/masuda/train_10000.tsv
SAVE_PATH=./results/masuda/net_trained_10000.pth
LOG_FILE=./results/masuda/train_10000.log
function run_once() {
poetry run python train.py --batch_size ${BATCH_SIZE} --text_length ${TEXT_LENGTH} --epoch ${EPOCH} ${DO_NORMALIZE} ${MECAB_OPT} --save_path ${SAVE_PATH} ${CONF_FILE} ${BASE_MODEL} ${TRAIN_TSV} ${VOCAB_FILE} >& ${LOG_FILE} &
tail -f ${LOG_FILE}
}
run_once