提交 1263b210 编写于 作者: H Hui Zhang

more decoding method

上级 538bf271
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
data: data:
train_manifest: data/manifest.train train_manifest: data/manifest.train
dev_manifest: data/manifest.dev dev_manifest: data/manifest.dev
test_manifest: data/manifest.test test_manifest: data/manifest.test-clean
vocab_filepath: data/vocab.txt vocab_filepath: data/vocab.txt
unit_type: 'spm' unit_type: 'spm'
spm_model_prefix: 'data/bpe_unigram_5000' spm_model_prefix: 'data/bpe_unigram_5000'
......
...@@ -21,17 +21,39 @@ ckpt_prefix=$2 ...@@ -21,17 +21,39 @@ ckpt_prefix=$2
# exit 1 # exit 1
#fi #fi
python3 -u ${BIN_DIR}/test.py \ for type in attention ctc_greedy_search; do
--device ${device} \ echo "decoding ${type}"
--nproc 1 \ batch_size=64
--config ${config_path} \ python3 -u ${BIN_DIR}/test.py \
--result_file ${ckpt_prefix}.rsl \ --device ${device} \
--checkpoint_path ${ckpt_prefix} --nproc 1 \
--config ${config_path} \
if [ $? -ne 0 ]; then --result_file ${ckpt_prefix}.rsl \
echo "Failed in evaluation!" --checkpoint_path ${ckpt_prefix} \
exit 1 --opts decoding.decoding_method ${type} decoding.batch_size ${batch_size}
fi
if [ $? -ne 0 ]; then
echo "Failed in evaluation!"
exit 1
fi
done
for type in ctc_prefix_beam_search attention_rescoring; do
echo "decoding ${type}"
batch_size=1
python3 -u ${BIN_DIR}/test.py \
--device ${device} \
--nproc 1 \
--config ${config_path} \
--result_file ${ckpt_prefix}.rsl \
--checkpoint_path ${ckpt_prefix} \
--opts decoding.decoding_method ${type} decoding.batch_size ${batch_size}
if [ $? -ne 0 ]; then
echo "Failed in evaluation!"
exit 1
fi
done
exit 0 exit 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册