Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
cb383a39
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看板
提交
cb383a39
编写于
11月 30, 2021
作者:
H
huangyuxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the benchmark
上级
1aeca848
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
11 deletion
+13
-11
paddlespeech/s2t/training/trainer.py
paddlespeech/s2t/training/trainer.py
+2
-1
tests/benchmark/conformer/prepare.sh
tests/benchmark/conformer/prepare.sh
+1
-1
tests/benchmark/conformer/run.sh
tests/benchmark/conformer/run.sh
+1
-1
tests/benchmark/conformer/run_benchmark.sh
tests/benchmark/conformer/run_benchmark.sh
+9
-8
未找到文件。
paddlespeech/s2t/training/trainer.py
浏览文件 @
cb383a39
...
...
@@ -245,8 +245,9 @@ class Trainer():
self
.
maybe_batch_sampler_step
()
def
after_train_batch
(
self
):
if
self
.
args
.
benchmark_max_step
and
self
.
iteration
>
self
.
args
.
benchmark_max_step
:
if
self
.
args
.
benchmark_max_step
:
profiler
.
add_profiler_step
(
self
.
args
.
profiler_options
)
if
self
.
args
.
benchmark_max_step
and
self
.
iteration
>
self
.
args
.
benchmark_max_step
:
logger
.
info
(
f
"Reach benchmark-max-step:
{
self
.
args
.
benchmark_max_step
}
"
)
sys
.
exit
(
...
...
tests/benchmark/conformer/prepare.sh
浏览文件 @
cb383a39
...
...
@@ -2,7 +2,7 @@ cd ../../../
pip
install
-e
.
# 安装pdspeech
cd
-
#Enter the example dir
pushd
../../../examples/aishell/
s
1
pushd
../../../examples/aishell/
asr
1
#Prepare the data
bash run.sh
--stage
0
--stop_stage
0
tests/benchmark/conformer/run.sh
浏览文件 @
cb383a39
...
...
@@ -8,7 +8,7 @@ cd ${CUR_DIR}
sed
-i
'/set\ -xe/d'
run_benchmark.sh
#cd **
pushd
../../../examples/aishell/
s
1
pushd
../../../examples/aishell/
asr
1
# 1 安装该模型需要的依赖 (如需开启优化策略请注明)
# 2 拷贝该模型需要数据、预训练模型
...
...
tests/benchmark/conformer/run_benchmark.sh
浏览文件 @
cb383a39
#!/usr/bin/env bash
set
-xe
# 运行示例:CUDA_VISIBLE_DEVICES=0 bash run_benchmark.sh ${run_mode} ${bs_item} ${fp_item} 500 ${model_mode}
# 参数说明
function
_set_params
(){
...
...
@@ -35,13 +34,15 @@ function _set_params(){
function
_train
(){
echo
"Train on
${
num_gpu_devices
}
GPUs"
echo
"current CUDA_VISIBLE_DEVICES=
$CUDA_VISIBLE_DEVICES
, gpus=
$num_gpu_devices
, batch_size=
$batch_size
"
train_cmd
=
"--config=
${
config_path
}
--output=
${
output
}
--seed=
${
seed
}
--ngpu=
${
ngpu
}
--profiler-options "
${
profiler_options
}
"
--benchmark-batch-size
${
batch_size
}
--benchmark-max-step
${
benchmark_max_step
}
"
train_cmd
=
"--config=
${
config_path
}
\
--output=
${
output
}
\
--seed=
${
seed
}
\
--ngpu=
${
ngpu
}
\
--benchmark-batch-size
${
batch_size
}
\
--benchmark-max-step
${
benchmark_max_step
}
"
if
[
${
profiler_options
}
!=
"None"
]
;
then
train_cmd
=
${
train_cmd
}
" --profiler-options=
${
profiler_options
}
"
fi
case
${
run_mode
}
in
sp
)
train_cmd
=
"python -u
${
BIN_DIR
}
/train.py "
${
train_cmd
}
;;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录