Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
862f9dec
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看板
提交
862f9dec
编写于
2月 03, 2021
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update decoder py3
上级
00e10975
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
6 deletion
+6
-6
.travis.yml
.travis.yml
+3
-3
decoders/decoders_deprecated.py
decoders/decoders_deprecated.py
+3
-3
未找到文件。
.travis.yml
浏览文件 @
862f9dec
...
...
@@ -18,10 +18,10 @@ addons:
-
python3-dev
before_install
:
-
python --version
-
pip --version
-
sudo pip install -U virtualenv pre-commit pip
-
sudo pip3 install -U virtualenv pre-commit pip
-
docker pull paddlepaddle/paddle:latest
-
python3 --version
-
pip3 --version
script
:
-
exit_code=0
...
...
decoders/decoders_deprecated.py
浏览文件 @
862f9dec
...
...
@@ -120,7 +120,7 @@ def ctc_beam_search_decoder(probs_seq,
prob_idx
=
prob_idx
[
0
:
cutoff_len
]
for
l
in
prefix_set_prev
:
if
not
prefix_set_next
.
has_key
(
l
)
:
if
l
not
in
prefix_set_next
:
probs_b_cur
[
l
],
probs_nb_cur
[
l
]
=
0.0
,
0.0
# extend prefix by travering prob_idx
...
...
@@ -134,7 +134,7 @@ def ctc_beam_search_decoder(probs_seq,
last_char
=
l
[
-
1
]
new_char
=
vocabulary
[
c
]
l_plus
=
l
+
new_char
if
not
prefix_set_next
.
has_key
(
l_plus
)
:
if
l_plus
not
in
prefix_set_next
:
probs_b_cur
[
l_plus
],
probs_nb_cur
[
l_plus
]
=
0.0
,
0.0
if
new_char
==
last_char
:
...
...
@@ -161,7 +161,7 @@ def ctc_beam_search_decoder(probs_seq,
## store top beam_size prefixes
prefix_set_prev
=
sorted
(
prefix_set_next
.
ite
rite
ms
(),
key
=
lambda
asd
:
asd
[
1
],
reverse
=
True
)
prefix_set_next
.
items
(),
key
=
lambda
asd
:
asd
[
1
],
reverse
=
True
)
if
beam_size
<
len
(
prefix_set_prev
):
prefix_set_prev
=
prefix_set_prev
[:
beam_size
]
prefix_set_prev
=
dict
(
prefix_set_prev
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录