Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
96c64237
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
接近 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
96c64237
编写于
7月 07, 2021
作者:
H
Hui Zhang
提交者:
GitHub
7月 07, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #703 from PaddlePaddle/shell
fix sha bone; more detial of chunk exp;
上级
fe0c3bb9
007746bf
变更
39
隐藏空白更改
内联
并排
Showing
39 changed file
with
140 addition
and
96 deletion
+140
-96
examples/aishell/s0/local/client.sh
examples/aishell/s0/local/client.sh
+1
-1
examples/aishell/s0/local/data.sh
examples/aishell/s0/local/data.sh
+1
-1
examples/aishell/s0/local/download_lm_ch.sh
examples/aishell/s0/local/download_lm_ch.sh
+1
-1
examples/aishell/s0/local/export.sh
examples/aishell/s0/local/export.sh
+2
-2
examples/aishell/s0/local/server.sh
examples/aishell/s0/local/server.sh
+1
-1
examples/aishell/s0/local/test.sh
examples/aishell/s0/local/test.sh
+2
-2
examples/aishell/s0/local/train.sh
examples/aishell/s0/local/train.sh
+2
-2
examples/aishell/s0/local/tune.sh
examples/aishell/s0/local/tune.sh
+1
-1
examples/aishell/s1/README.md
examples/aishell/s1/README.md
+5
-5
examples/aishell/s1/local/align.sh
examples/aishell/s1/local/align.sh
+2
-8
examples/aishell/s1/local/data.sh
examples/aishell/s1/local/data.sh
+1
-1
examples/aishell/s1/local/export.sh
examples/aishell/s1/local/export.sh
+2
-2
examples/aishell/s1/local/test.sh
examples/aishell/s1/local/test.sh
+13
-6
examples/aishell/s1/local/train.sh
examples/aishell/s1/local/train.sh
+2
-2
examples/librispeech/s0/local/data.sh
examples/librispeech/s0/local/data.sh
+1
-1
examples/librispeech/s0/local/download_lm_en.sh
examples/librispeech/s0/local/download_lm_en.sh
+1
-1
examples/librispeech/s0/local/export.sh
examples/librispeech/s0/local/export.sh
+2
-2
examples/librispeech/s0/local/test.sh
examples/librispeech/s0/local/test.sh
+2
-2
examples/librispeech/s0/local/train.sh
examples/librispeech/s0/local/train.sh
+2
-2
examples/librispeech/s0/local/tune.sh
examples/librispeech/s0/local/tune.sh
+1
-1
examples/librispeech/s1/README.md
examples/librispeech/s1/README.md
+12
-0
examples/librispeech/s1/conf/chunk_confermer.yaml
examples/librispeech/s1/conf/chunk_confermer.yaml
+1
-1
examples/librispeech/s1/local/align.sh
examples/librispeech/s1/local/align.sh
+2
-8
examples/librispeech/s1/local/data.sh
examples/librispeech/s1/local/data.sh
+1
-1
examples/librispeech/s1/local/download_lm_en.sh
examples/librispeech/s1/local/download_lm_en.sh
+1
-1
examples/librispeech/s1/local/export.sh
examples/librispeech/s1/local/export.sh
+2
-2
examples/librispeech/s1/local/test.sh
examples/librispeech/s1/local/test.sh
+15
-3
examples/librispeech/s1/local/train.sh
examples/librispeech/s1/local/train.sh
+2
-2
examples/tiny/s0/local/data.sh
examples/tiny/s0/local/data.sh
+1
-1
examples/tiny/s0/local/download_lm_en.sh
examples/tiny/s0/local/download_lm_en.sh
+1
-1
examples/tiny/s0/local/export.sh
examples/tiny/s0/local/export.sh
+2
-2
examples/tiny/s0/local/test.sh
examples/tiny/s0/local/test.sh
+2
-2
examples/tiny/s0/local/train.sh
examples/tiny/s0/local/train.sh
+2
-2
examples/tiny/s0/local/tune.sh
examples/tiny/s0/local/tune.sh
+1
-1
examples/tiny/s1/local/align.sh
examples/tiny/s1/local/align.sh
+2
-8
examples/tiny/s1/local/data.sh
examples/tiny/s1/local/data.sh
+1
-1
examples/tiny/s1/local/export.sh
examples/tiny/s1/local/export.sh
+2
-2
examples/tiny/s1/local/test.sh
examples/tiny/s1/local/test.sh
+43
-12
examples/tiny/s1/local/train.sh
examples/tiny/s1/local/train.sh
+2
-2
未找到文件。
examples/aishell/s0/local/client.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
source
path.sh
...
...
examples/aishell/s0/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/aishell/s0/local/download_lm_ch.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
.
${
MAIN_ROOT
}
/utils/utility.sh
...
...
examples/aishell/s0/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/aishell/s0/local/server.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
# TODO: replace the model with a mandarin model
if
[[
$#
!=
1
]]
;
then
...
...
examples/aishell/s0/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,7 +9,7 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
...
...
examples/aishell/s0/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/aishell/s0/local/tune.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
# grid-search for hyper-parameters in language model
python3
-u
${
BIN_DIR
}
/tune.py
\
...
...
examples/aishell/s1/README.md
浏览文件 @
96c64237
...
...
@@ -12,12 +12,12 @@
## Chunk Conformer
| Model | Params | Config | Augmentation| Test set | Decode method | Chunk | Loss | WER |
| Model | Params | Config | Augmentation| Test set | Decode method | Chunk
Size & Left Chunks
| Loss | WER |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | attention | 16 | - | 0.061939 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | ctc_greedy_search | 16 | - | 0.070806 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | ctc_prefix_beam_search | 16 | - | 0.070739 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | attention_rescoring | 16 | - | 0.059400 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | attention | 16
, -1
| - | 0.061939 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | ctc_greedy_search | 16
, -1
| - | 0.070806 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | ctc_prefix_beam_search | 16
, -1
| - | 0.070739 |
| conformer | 47.06M | conf/chunk_conformer.yaml | spec_aug + shift | test | attention_rescoring | 16
, -1
| - | 0.059400 |
## Transformer
...
...
examples/aishell/s1/local/align.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,18 +9,12 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
ckpt_name
=
$(
basename
${
ckpt_prefxi
}
)
mkdir
-p
exp
batch_size
=
1
output_dir
=
${
ckpt_prefix
}
mkdir
-p
${
output_dir
}
...
...
examples/aishell/s1/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/aishell/s1/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/aishell/s1/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,15 +9,17 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
ckpt_name
=
$(
basename
${
ckpt_prefxi
}
)
mkdir
-p
exp
chunk_mode
=
false
if
[[
${
config_path
}
=
~ ^chunk_
]]
;
then
chunk_mode
=
true
fi
# download language model
#bash local/download_lm_ch.sh
...
...
@@ -28,7 +30,12 @@ mkdir -p exp
for
type
in
attention ctc_greedy_search
;
do
echo
"decoding
${
type
}
"
batch_size
=
64
if
[
${
chunk_mode
}
==
true
]
;
then
# stream decoding only support batchsize=1
batch_size
=
1
else
batch_size
=
64
fi
output_dir
=
${
ckpt_prefix
}
mkdir
-p
${
output_dir
}
python3
-u
${
BIN_DIR
}
/test.py
\
...
...
examples/aishell/s1/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
echo
"using
${
device
}
..."
...
...
examples/librispeech/s0/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/librispeech/s0/local/download_lm_en.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
.
${
MAIN_ROOT
}
/utils/utility.sh
...
...
examples/librispeech/s0/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/librispeech/s0/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,7 +9,7 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
...
...
examples/librispeech/s0/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
echo
"using
${
device
}
..."
...
...
examples/librispeech/s0/local/tune.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
1
]
;
then
echo
"usage: tune ckpt_path"
...
...
examples/librispeech/s1/README.md
浏览文件 @
96c64237
...
...
@@ -10,6 +10,18 @@
| conformer | 47.63 M | conf/conformer.yaml | spec_aug + shift | test-clean | ctc_prefix_beam_search | 6.35 | 0.037761 |
| conformer | 47.63 M | conf/conformer.yaml | spec_aug + shift | test-clean | attention_rescoring | 6.35 | 0.032115 |
## Chunk Conformer
| Model | Params | Config | Augmentation| Test set | Decode method | Chunk Size & Left Chunks | Loss | WER |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| conformer | 47.63 M | conf/chunk_conformer.yaml | spec_aug + shift | test-clean | attention | 16, -1 | 7.01250648 | |
| conformer | 47.63 M | conf/chunk_conformer.yaml | spec_aug + shift | test-clean | ctc_greedy_search | 16, -1 | 7.01250648 | |
| conformer | 47.63 M | conf/chunk_conformer.yaml | spec_aug + shift | test-clean | ctc_prefix_beam_search | 16, -1 | 7.01250648 | |
| conformer | 47.63 M | conf/chunk_conformer.yaml | spec_aug + shift | test-clean | attention_rescoring | 16, -1 | 7.01250648 | |
## Transformer
| Model | Params | Config | Augmentation| Test set | Decode method | Loss | WER |
...
...
examples/librispeech/s1/conf/chunk_confermer.yaml
浏览文件 @
96c64237
...
...
@@ -110,7 +110,7 @@ decoding:
cutoff_top_n
:
0
num_proc_bsearch
:
8
ctc_weight
:
0.5
# ctc weight for attention rescoring decode mode.
decoding_chunk_size
:
-1
# decoding chunk size. Defaults to -1.
decoding_chunk_size
:
16
# decoding chunk size. Defaults to -1.
# <0: for decoding, use full chunk.
# >0: for decoding, use fixed chunk size as set.
# 0: used for training, it's prohibited here.
...
...
examples/librispeech/s1/local/align.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,18 +9,12 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
ckpt_name
=
$(
basename
${
ckpt_prefxi
}
)
mkdir
-p
exp
batch_size
=
1
output_dir
=
${
ckpt_prefix
}
mkdir
-p
${
output_dir
}
...
...
examples/librispeech/s1/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/librispeech/s1/local/download_lm_en.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
.
${
MAIN_ROOT
}
/utils/utility.sh
...
...
examples/librispeech/s1/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/librispeech/s1/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,12 +9,19 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
chunk_mode
=
false
if
[[
${
config_path
}
=
~ ^chunk_
]]
;
then
chunk_mode
=
true
fi
# download language model
#bash local/download_lm_en.sh
#if [ $? -ne 0 ]; then
...
...
@@ -23,7 +30,12 @@ ckpt_prefix=$2
for
type
in
attention ctc_greedy_search
;
do
echo
"decoding
${
type
}
"
batch_size
=
64
if
[
${
chunk_mode
}
==
true
]
;
then
# stream decoding only support batchsize=1
batch_size
=
1
else
batch_size
=
64
fi
python3
-u
${
BIN_DIR
}
/test.py
\
--device
${
device
}
\
--nproc
1
\
...
...
examples/librispeech/s1/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
echo
"using
${
device
}
..."
...
...
examples/tiny/s0/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/tiny/s0/local/download_lm_en.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
.
${
MAIN_ROOT
}
/utils/utility.sh
...
...
examples/tiny/s0/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/tiny/s0/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,7 +9,7 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
...
...
examples/tiny/s0/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/tiny/s0/local/tune.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
1
]
;
then
echo
"usage: tune ckpt_path"
...
...
examples/tiny/s1/local/align.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,18 +9,12 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
ckpt_name
=
$(
basename
${
ckpt_prefxi
}
)
mkdir
-p
exp
batch_size
=
1
output_dir
=
${
ckpt_prefix
}
mkdir
-p
${
output_dir
}
...
...
examples/tiny/s1/local/data.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
stage
=
-1
stop_stage
=
100
...
...
examples/tiny/s1/local/export.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
3
]
;
then
echo
"usage:
$0
config_path ckpt_prefix jit_model_path"
...
...
@@ -13,7 +13,7 @@ ckpt_path_prefix=$2
jit_model_export_path
=
$3
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
examples/tiny/s1/local/test.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
config_path ckpt_path_prefix"
...
...
@@ -9,29 +9,60 @@ ngpu=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
echo
"using
$ngpu
gpus..."
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
config_path
=
$1
ckpt_prefix
=
$2
chunk_mode
=
false
if
[[
${
config_path
}
=
~ ^chunk_
]]
;
then
chunk_mode
=
true
fi
# download language model
#bash local/download_lm_en.sh
#if [ $? -ne 0 ]; then
# exit 1
#fi
python3
-u
${
BIN_DIR
}
/test.py
\
--device
${
device
}
\
--nproc
1
\
--config
${
config_path
}
\
--result_file
${
ckpt_prefix
}
.rsl
\
--checkpoint_path
${
ckpt_prefix
}
for
type
in
attention ctc_greedy_search
;
do
echo
"decoding
${
type
}
"
if
[
${
chunk_mode
}
==
true
]
;
then
# stream decoding only support batchsize=1
batch_size
=
1
else
batch_size
=
64
fi
python3
-u
${
BIN_DIR
}
/test.py
\
--device
${
device
}
\
--nproc
1
\
--config
${
config_path
}
\
--result_file
${
ckpt_prefix
}
.
${
type
}
.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
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
}
.
${
type
}
.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
examples/tiny/s1/local/train.sh
浏览文件 @
96c64237
#!
/usr/bin/env
bash
#!
/bin/
bash
if
[
$#
!=
2
]
;
then
echo
"usage: CUDA_VISIBLE_DEVICES=0
${
0
}
config_path ckpt_name"
...
...
@@ -12,7 +12,7 @@ config_path=$1
ckpt_name
=
$2
device
=
gpu
if
[
ngpu
==
0
]
;
then
if
[
${
ngpu
}
==
0
]
;
then
device
=
cpu
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录