Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
0729abe0
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看板
提交
0729abe0
编写于
6月 20, 2017
作者:
Y
Yibing Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tiny adjust
上级
d8089315
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
5 deletion
+2
-5
decoder.py
decoder.py
+2
-4
infer.py
infer.py
+0
-1
未找到文件。
decoder.py
浏览文件 @
0729abe0
"""Contains various CTC decoder."""
"""Contains various CTC decoder
s
."""
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
...
@@ -103,7 +103,7 @@ def ctc_beam_search_decoder(probs_seq,
...
@@ -103,7 +103,7 @@ def ctc_beam_search_decoder(probs_seq,
beam_size to find many paths to one label, return beam_size labels in
beam_size to find many paths to one label, return beam_size labels in
the descending order of probabilities. The implementation is based on Prefix
the descending order of probabilities. The implementation is based on Prefix
Beam Search(https://arxiv.org/abs/1408.2873), and the unclear part is
Beam Search(https://arxiv.org/abs/1408.2873), and the unclear part is
redesigned
, need to be verified
.
redesigned.
:param probs_seq: 2-D list with length num_time_steps, each element
:param probs_seq: 2-D list with length num_time_steps, each element
is a list of normalized probabilities over vocabulary
is a list of normalized probabilities over vocabulary
...
@@ -262,9 +262,7 @@ def ctc_beam_search_decoder_nproc(probs_split,
...
@@ -262,9 +262,7 @@ def ctc_beam_search_decoder_nproc(probs_split,
:type num_processes: int
:type num_processes: int
:return: Decoding log probabilities and result sentences in descending order.
:return: Decoding log probabilities and result sentences in descending order.
:rtype: list
:rtype: list
'''
'''
if
num_processes
is
None
:
if
num_processes
is
None
:
num_processes
=
multiprocessing
.
cpu_count
()
num_processes
=
multiprocessing
.
cpu_count
()
if
not
num_processes
>
0
:
if
not
num_processes
>
0
:
...
...
infer.py
浏览文件 @
0729abe0
...
@@ -151,7 +151,6 @@ def infer():
...
@@ -151,7 +151,6 @@ def infer():
## decode and print
## decode and print
# best path decode
# best path decode
wer_sum
,
wer_counter
=
0
,
0
wer_sum
,
wer_counter
=
0
,
0
total_time
=
0.0
if
args
.
decode_method
==
"best_path"
:
if
args
.
decode_method
==
"best_path"
:
for
i
,
probs
in
enumerate
(
probs_split
):
for
i
,
probs
in
enumerate
(
probs_split
):
target_transcription
=
''
.
join
([
target_transcription
=
''
.
join
([
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录