Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
7c6fa642
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,发现更多精彩内容 >>
提交
7c6fa642
编写于
1月 15, 2018
作者:
Y
Yibing Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename infer_probs_batch to infer_batch_probs
上级
dd2588c9
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
6 addition
and
6 deletion
+6
-6
deploy/demo_server.py
deploy/demo_server.py
+1
-1
infer.py
infer.py
+2
-2
model_utils/model.py
model_utils/model.py
+1
-1
test.py
test.py
+1
-1
tools/tune.py
tools/tune.py
+1
-1
未找到文件。
deploy/demo_server.py
浏览文件 @
7c6fa642
...
...
@@ -166,7 +166,7 @@ def start_server():
# prepare ASR inference handler
def
file_to_transcript
(
filename
):
feature
=
data_generator
.
process_utterance
(
filename
,
""
)
probs_split
=
ds2_model
.
infer_
probs_batch
(
probs_split
=
ds2_model
.
infer_
batch_probs
(
infer_data
=
[
feature
],
feeding_dict
=
data_generator
.
feeding
)
...
...
infer.py
浏览文件 @
7c6fa642
...
...
@@ -92,7 +92,7 @@ def infer():
if
args
.
decoding_method
==
"ctc_greedy"
:
ds2_model
.
logger
.
info
(
"start inference ..."
)
probs_split
=
ds2_model
.
infer_
probs_batch
(
infer_data
=
infer_data
,
probs_split
=
ds2_model
.
infer_
batch_probs
(
infer_data
=
infer_data
,
feeding_dict
=
data_generator
.
feeding
)
result_transcripts
=
ds2_model
.
decode_batch_greedy
(
probs_split
=
probs_split
,
...
...
@@ -101,7 +101,7 @@ def infer():
ds2_model
.
init_ext_scorer
(
args
.
alpha
,
args
.
beta
,
args
.
lang_model_path
,
vocab_list
)
ds2_model
.
logger
.
info
(
"start inference ..."
)
probs_split
=
ds2_model
.
infer_
probs_batch
(
infer_data
=
infer_data
,
probs_split
=
ds2_model
.
infer_
batch_probs
(
infer_data
=
infer_data
,
feeding_dict
=
data_generator
.
feeding
)
result_transcripts
=
ds2_model
.
decode_batch_beam_search
(
probs_split
=
probs_split
,
...
...
model_utils/model.py
浏览文件 @
7c6fa642
...
...
@@ -173,7 +173,7 @@ class DeepSpeech2Model(object):
# run inference
return
self
.
_loss_inferer
.
infer
(
input
=
infer_data
)
def
infer_
probs_batch
(
self
,
infer_data
,
feeding_dict
):
def
infer_
batch_probs
(
self
,
infer_data
,
feeding_dict
):
"""Infer the prob matrices for a batch of speech utterances.
:param infer_data: List of utterances to infer, with each utterance
...
...
test.py
浏览文件 @
7c6fa642
...
...
@@ -97,7 +97,7 @@ def evaluate():
errors_sum
,
len_refs
,
num_ins
=
0.0
,
0
,
0
ds2_model
.
logger
.
info
(
"start evaluation ..."
)
for
infer_data
in
batch_reader
():
probs_split
=
ds2_model
.
infer_
probs_batch
(
probs_split
=
ds2_model
.
infer_
batch_probs
(
infer_data
=
infer_data
,
feeding_dict
=
data_generator
.
feeding
)
...
...
tools/tune.py
浏览文件 @
7c6fa642
...
...
@@ -120,7 +120,7 @@ def tune():
for
infer_data
in
batch_reader
():
if
(
args
.
num_batches
>=
0
)
and
(
cur_batch
>=
args
.
num_batches
):
break
probs_split
=
ds2_model
.
infer_
probs_batch
(
probs_split
=
ds2_model
.
infer_
batch_probs
(
infer_data
=
infer_data
,
feeding_dict
=
data_generator
.
feeding
)
target_transcripts
=
[
data
[
1
]
for
data
in
infer_data
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录