Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
38174c70
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
38174c70
编写于
9月 02, 2021
作者:
J
Jackwaterveg
提交者:
GitHub
9月 02, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #802 from PaddlePaddle/fix_ds2_bw_bug
fix the bug of sharing cell in BiGRU and BIRNN
上级
0d90d3f9
f54dc983
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
22 addition
and
15 deletion
+22
-15
README.md
README.md
+1
-1
README_cn.md
README_cn.md
+1
-1
deepspeech/models/ds2/rnn.py
deepspeech/models/ds2/rnn.py
+7
-7
deepspeech/modules/ctc.py
deepspeech/modules/ctc.py
+7
-3
examples/aishell/s0/README.md
examples/aishell/s0/README.md
+4
-1
utils/avg.sh
utils/avg.sh
+2
-2
未找到文件。
README.md
浏览文件 @
38174c70
...
...
@@ -18,7 +18,7 @@
All tested under:
*
Ubuntu 16.04
*
python>=3.7
*
paddlepaddle>=2.
1.2
*
paddlepaddle>=2.
2.0rc
Please see
[
install
](
doc/src/install.md
)
.
...
...
README_cn.md
浏览文件 @
38174c70
...
...
@@ -20,7 +20,7 @@
*
Ubuntu 16.04
*
python>=3.7
*
paddlepaddle>=2.
1.2
*
paddlepaddle>=2.
2.0rc
参看
[
安装
](
doc/src/install.md
)
。
...
...
deepspeech/models/ds2/rnn.py
浏览文件 @
38174c70
...
...
@@ -202,7 +202,7 @@ class BiRNNWithBN(nn.Layer):
self
.
fw_rnn
=
nn
.
RNN
(
self
.
fw_cell
,
is_reverse
=
False
,
time_major
=
False
)
#[B, T, D]
self
.
bw_rnn
=
nn
.
RNN
(
self
.
f
w_cell
,
is_reverse
=
True
,
time_major
=
False
)
#[B, T, D]
self
.
b
w_cell
,
is_reverse
=
True
,
time_major
=
False
)
#[B, T, D]
def
forward
(
self
,
x
:
paddle
.
Tensor
,
x_len
:
paddle
.
Tensor
):
# x, shape [B, T, D]
...
...
@@ -246,7 +246,7 @@ class BiGRUWithBN(nn.Layer):
self
.
fw_rnn
=
nn
.
RNN
(
self
.
fw_cell
,
is_reverse
=
False
,
time_major
=
False
)
#[B, T, D]
self
.
bw_rnn
=
nn
.
RNN
(
self
.
f
w_cell
,
is_reverse
=
True
,
time_major
=
False
)
#[B, T, D]
self
.
b
w_cell
,
is_reverse
=
True
,
time_major
=
False
)
#[B, T, D]
def
forward
(
self
,
x
,
x_len
):
# x, shape [B, T, D]
...
...
deepspeech/modules/ctc.py
浏览文件 @
38174c70
...
...
@@ -22,6 +22,13 @@ from deepspeech.utils.log import Log
logger
=
Log
(
__name__
).
getlog
()
try
:
from
deepspeech.decoders.swig_wrapper
import
ctc_beam_search_decoder_batch
# noqa: F401
from
deepspeech.decoders.swig_wrapper
import
ctc_greedy_decoder
# noqa: F401
from
deepspeech.decoders.swig_wrapper
import
Scorer
# noqa: F401
except
Exception
as
e
:
logger
.
info
(
"ctcdecoder not installed!"
)
__all__
=
[
'CTCDecoder'
]
...
...
@@ -216,9 +223,6 @@ class CTCDecoder(nn.Layer):
def
init_decode
(
self
,
beam_alpha
,
beam_beta
,
lang_model_path
,
vocab_list
,
decoding_method
):
from
deepspeech.decoders.swig_wrapper
import
ctc_beam_search_decoder_batch
# noqa: F401
from
deepspeech.decoders.swig_wrapper
import
ctc_greedy_decoder
# noqa: F401
from
deepspeech.decoders.swig_wrapper
import
Scorer
# noqa: F401
if
decoding_method
==
"ctc_beam_search"
:
self
.
_init_ext_scorer
(
beam_alpha
,
beam_beta
,
lang_model_path
,
...
...
examples/aishell/s0/README.md
浏览文件 @
38174c70
...
...
@@ -10,8 +10,11 @@
| Model | Params | Release | Config | Test set | Loss | CER |
| --- | --- | --- | --- | --- | --- | --- |
| DeepSpeech2 | 58.4M | 2.2.0 | conf/deepspeech2.yaml + spec aug | test | 5.71956205368042 | 0.064287 |
| DeepSpeech2 | 58.4M | 2.2.0 | conf/deepspeech2.yaml + spec aug | test | 6.016139030456543 | 0.066549 |
| --- | --- | --- | --- | --- | --- | --- |
| DeepSpeech2 | 58.4M | 7181e427 | conf/deepspeech2.yaml + spec aug | test | 5.71956205368042 | 0.064287 |
| DeepSpeech2 | 58.4M | 2.1.0 | conf/deepspeech2.yaml + spec aug | test | 7.483316898345947 | 0.077860 |
| DeepSpeech2 | 58.4M | 2.1.0 | conf/deepspeech2.yaml | test | 7.299022197723389 | 0.078671 |
| DeepSpeech2 | 58.4M | 2.0.0 | conf/deepspeech2.yaml | test | - | 0.078977 |
| --- | --- | --- | --- | --- | --- | --- |
| DeepSpeech2 | 58.4M | 1.8.5 | - | test | - | 0.080447 |
utils/avg.sh
浏览文件 @
38174c70
...
...
@@ -5,8 +5,8 @@ if [ $# != 3 ]; then
exit
-1
fi
ckpt_dir
=
${
1
}
avg_mode
=
${
2
}
# best,latest
avg_mode
=
${
1
}
# best,latest
ckpt_dir
=
${
2
}
average_num
=
${
3
}
decode_checkpoint
=
${
ckpt_dir
}
/avg_
${
average_num
}
.pdparams
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录