Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
c693bb08
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
1 年多 前同步成功
通知
207
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看板
提交
c693bb08
编写于
4月 25, 2021
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix log, add avg script
上级
ec348147
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
44 addition
and
9 deletion
+44
-9
deepspeech/exps/u2/model.py
deepspeech/exps/u2/model.py
+1
-1
examples/aishell/s1/conf/conformer.yaml
examples/aishell/s1/conf/conformer.yaml
+1
-1
examples/aishell/s1/local/avg.sh
examples/aishell/s1/local/avg.sh
+24
-0
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
+11
-5
examples/aishell/s1/local/train.sh
examples/aishell/s1/local/train.sh
+5
-0
未找到文件。
deepspeech/exps/u2/model.py
浏览文件 @
c693bb08
...
...
@@ -136,7 +136,7 @@ class U2Trainer(Trainer):
msg
=
f
"Valid: Rank:
{
dist
.
get_rank
()
}
, "
msg
+=
"epoch: {}, "
.
format
(
self
.
epoch
)
msg
+=
"step: {}, "
.
format
(
self
.
iteration
)
msg
+=
"batch
: {}/{}, "
.
format
(
i
+
1
,
len
(
self
.
valid_loader
))
msg
+=
"batch: {}/{}, "
.
format
(
i
+
1
,
len
(
self
.
valid_loader
))
msg
+=
', '
.
join
(
'{}: {:>.6f}'
.
format
(
k
,
v
)
for
k
,
v
in
valid_dump
.
items
())
logger
.
info
(
msg
)
...
...
examples/aishell/s1/conf/conformer.yaml
浏览文件 @
c693bb08
...
...
@@ -90,7 +90,7 @@ training:
decoding
:
batch_size
:
16
error_rate_type
:
wer
error_rate_type
:
cer
decoding_method
:
attention
# 'attention', 'ctc_greedy_search', 'ctc_prefix_beam_search', 'attention_rescoring'
lang_model_path
:
data/lm/common_crawl_00.prune01111.trie.klm
alpha
:
2.5
...
...
examples/aishell/s1/local/avg.sh
0 → 100644
浏览文件 @
c693bb08
#! /usr/bin/env bash
if
[
$#
!=
2
]
;
then
echo
"usage:
${
0
}
ckpt_path avg_num"
exit
-1
fi
ckpt_path
=
${
1
}
average_num
=
${
2
}
decode_checkpoint
=
${
ckpt_path
}
/avg_
${
average_num
}
.pt
python3
-u
${
MAIN_ROOT
}
/utils/avg_model.py
\
--dst_model
${
decode_checkpoint
}
\
--ckpt_dir
${
ckpt_path
}
\
--num
${
average_num
}
\
--val_best
if
[
$?
-ne
0
]
;
then
echo
"Failed in avg ckpt!"
exit
1
fi
exit
0
\ No newline at end of file
examples/aishell/s1/local/export.sh
浏览文件 @
c693bb08
#! /usr/bin/env bash
if
[
$#
!=
2
]
;
then
echo
"usage:
export
ckpt_path jit_model_path"
echo
"usage:
${
0
}
ckpt_path jit_model_path"
exit
-1
fi
...
...
@@ -12,7 +12,7 @@ python3 -u ${BIN_DIR}/export.py \
if
[
$?
-ne
0
]
;
then
echo
"Failed in e
valuation
!"
echo
"Failed in e
xport
!"
exit
1
fi
...
...
examples/aishell/s1/local/test.sh
浏览文件 @
c693bb08
#! /usr/bin/env bash
# download language model
bash
local
/download_lm_ch.sh
if
[
$?
-ne
0
]
;
then
exit
1
if
[
$#
!=
1
]
;
then
echo
"usage:
${
0
}
ckpt_path"
exit
-1
fi
# download language model
#bash local/download_lm_ch.sh
#if [ $? -ne 0 ]; then
# exit 1
#fi
python3
-u
${
BIN_DIR
}
/test.py
\
--device
'gpu'
\
--nproc
1
\
--config
conf/conformer.yaml
\
--output
ckpt
--result_file
${
1
}
.rsl
\
--checkpoint_path
${
1
}
if
[
$?
-ne
0
]
;
then
echo
"Failed in evaluation!"
...
...
examples/aishell/s1/local/train.sh
浏览文件 @
c693bb08
#! /usr/bin/env bash
if
[
$#
!=
1
]
;
then
echo
"usage:
${
0
}
ckpt_tag"
exit
-1
fi
ngpu
=
$(
echo
$CUDA_VISIBLE_DEVICES
|
awk
-F
","
'{print NF}'
)
echo
"using
$ngpu
gpus..."
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录