pcloud_train.sh 863 字节
Newer Older
1 2 3 4 5 6
DATA_PATH=$1
MODEL_PATH=$2
TRAIN_MANI=${DATA_PATH}/cloud.train.manifest
DEV_MANI=${DATA_PATH}/cloud.test.manifest
TRAIN_TAR=${DATA_PATH}/cloud.train.tar
DEV_TAR=${DATA_PATH}/cloud.test.tar
7
VOCAB_PATH=${DATA_PATH}/vocab.txt
8 9 10
MEAN_STD_FILE=${DATA_PATH}/mean_std.npz

# split train data for each pcloud node
11
python ./cloud/split_data.py \
12 13
--in_manifest_path=$TRAIN_MANI \
--data_tar_path=$TRAIN_TAR \
14
--out_manifest_path='./local.train.manifest'
15 16

# split dev data for each pcloud node
17
python ./cloud/split_data.py \
18 19
--in_manifest_path=$DEV_MANI \
--data_tar_path=$DEV_TAR \
20
--out_manifest_path='./local.test.manifest'
21 22 23 24 25

python train.py \
--use_gpu=1 \
--trainer_count=4 \
--mean_std_filepath=$MEAN_STD_FILE \
26 27
--train_manifest_path='./local.train.manifest' \
--dev_manifest_path='./local.test.manifest' \
28
--vocab_filepath=$VOCAB_PATH \
29
--output_model_dir=${MODEL_PATH}