未验证 提交 856c428f 编写于 作者: J Jacek Czaja 提交者: GitHub

Makeing script more flexible (#4681)

Added missing vars

Author:    Jacek Czaja <jacek.czaja@intel.com>
上级 b0239e3a
......@@ -9,15 +9,18 @@ TASK_NAME='senta'
DATA_PATH=./senta_data/
CKPT_PATH=./save_models
MODEL_PATH=./save_models/step_1800/
MODEL_TYPE=${MODEL_TYPE:-bilstm_net}
USE_CUDA=${USE_CUDA:-true}
# run_train on train.tsv and do_val on test.tsv
train() {
python -u run_classifier.py \
--task_name ${TASK_NAME} \
--use_cuda true \
--use_cuda $USE_CUDA \
--do_train true \
--do_val false \
--do_infer false \
--model_type $MODEL_TYPE \
--batch_size 8 \
--data_dir ${DATA_PATH} \
--vocab_path ${DATA_PATH}/word_dict.txt \
......@@ -33,10 +36,11 @@ train() {
evaluate() {
python -u run_classifier.py \
--task_name ${TASK_NAME} \
--use_cuda true \
--use_cuda $USE_CUDA \
--do_train false \
--do_val true \
--do_infer false \
--model_type $MODEL_TYPE \
--batch_size 10 \
--data_dir ${DATA_PATH} \
--vocab_path ${DATA_PATH}/word_dict.txt \
......@@ -48,10 +52,11 @@ evaluate() {
infer() {
python -u run_classifier.py \
--task_name ${TASK_NAME} \
--use_cuda true \
--use_cuda $USE_CUDA \
--do_train false \
--do_val false \
--do_infer true \
--model_type $MODEL_TYPE \
--batch_size 10 \
--data_dir ${DATA_PATH} \
--vocab_path ${DATA_PATH}/word_dict.txt \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册