Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
8d506270
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,发现更多精彩内容 >>
提交
8d506270
编写于
8月 20, 2021
作者:
H
huangyuxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the bug of 'import path error' for ds2
上级
86d08f99
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
14 deletion
+12
-14
.notebook/jit_infer.ipynb
.notebook/jit_infer.ipynb
+3
-3
deepspeech/exps/deepspeech2/bin/deploy/runtime.py
deepspeech/exps/deepspeech2/bin/deploy/runtime.py
+1
-1
deepspeech/exps/deepspeech2/bin/deploy/server.py
deepspeech/exps/deepspeech2/bin/deploy/server.py
+1
-1
deepspeech/exps/deepspeech2/bin/tune.py
deepspeech/exps/deepspeech2/bin/tune.py
+1
-1
deepspeech/models/ds2_online/conv.py
deepspeech/models/ds2_online/conv.py
+0
-2
deepspeech/models/ds2_online/deepspeech2.py
deepspeech/models/ds2_online/deepspeech2.py
+4
-4
tests/deepspeech2_online_model_test.py
tests/deepspeech2_online_model_test.py
+2
-2
未找到文件。
.notebook/jit_infer.ipynb
浏览文件 @
8d506270
...
...
@@ -83,8 +83,8 @@
"from deepspeech.frontend.utility import read_manifest\n",
"from deepspeech.utils.utility import add_arguments, print_arguments\n",
"\n",
"from deepspeech.models.d
eepspeech
2 import DeepSpeech2Model\n",
"from deepspeech.models.d
eepspeech
2 import DeepSpeech2InferModel\n",
"from deepspeech.models.d
s
2 import DeepSpeech2Model\n",
"from deepspeech.models.d
s
2 import DeepSpeech2InferModel\n",
"from deepspeech.io.dataset import ManifestDataset\n",
"\n",
"\n",
...
...
@@ -669,4 +669,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
\ No newline at end of file
}
deepspeech/exps/deepspeech2/bin/deploy/runtime.py
浏览文件 @
8d506270
...
...
@@ -23,7 +23,7 @@ from paddle.io import DataLoader
from
deepspeech.exps.deepspeech2.config
import
get_cfg_defaults
from
deepspeech.io.collator
import
SpeechCollator
from
deepspeech.io.dataset
import
ManifestDataset
from
deepspeech.models.d
eepspeech
2
import
DeepSpeech2Model
from
deepspeech.models.d
s
2
import
DeepSpeech2Model
from
deepspeech.training.cli
import
default_argument_parser
from
deepspeech.utils.socket_server
import
AsrRequestHandler
from
deepspeech.utils.socket_server
import
AsrTCPServer
...
...
deepspeech/exps/deepspeech2/bin/deploy/server.py
浏览文件 @
8d506270
...
...
@@ -21,7 +21,7 @@ from paddle.io import DataLoader
from
deepspeech.exps.deepspeech2.config
import
get_cfg_defaults
from
deepspeech.io.collator
import
SpeechCollator
from
deepspeech.io.dataset
import
ManifestDataset
from
deepspeech.models.d
eepspeech
2
import
DeepSpeech2Model
from
deepspeech.models.d
s
2
import
DeepSpeech2Model
from
deepspeech.training.cli
import
default_argument_parser
from
deepspeech.utils.socket_server
import
AsrRequestHandler
from
deepspeech.utils.socket_server
import
AsrTCPServer
...
...
deepspeech/exps/deepspeech2/bin/tune.py
浏览文件 @
8d506270
...
...
@@ -21,7 +21,7 @@ from paddle.io import DataLoader
from
deepspeech.exps.deepspeech2.config
import
get_cfg_defaults
from
deepspeech.io.collator
import
SpeechCollator
from
deepspeech.io.dataset
import
ManifestDataset
from
deepspeech.models.d
eepspeech
2
import
DeepSpeech2Model
from
deepspeech.models.d
s
2
import
DeepSpeech2Model
from
deepspeech.training.cli
import
default_argument_parser
from
deepspeech.utils
import
error_rate
from
deepspeech.utils.utility
import
add_arguments
...
...
deepspeech/models/ds2_online/conv.py
浏览文件 @
8d506270
...
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
from
paddle
import
nn
from
deepspeech.modules.embedding
import
PositionalEncoding
from
deepspeech.modules.subsampling
import
Conv2dSubsampling4
...
...
deepspeech/models/ds2_online/deepspeech2.py
浏览文件 @
8d506270
...
...
@@ -26,7 +26,7 @@ from deepspeech.utils.checkpoint import Checkpoint
from
deepspeech.utils.log
import
Log
logger
=
Log
(
__name__
).
getlog
()
__all__
=
[
'DeepSpeech2ModelOnline'
,
'DeepSpeech2InferModeOnline'
]
__all__
=
[
'DeepSpeech2ModelOnline'
,
'DeepSpeech2InferMode
l
Online'
]
class
CRNNEncoder
(
nn
.
Layer
):
...
...
@@ -68,7 +68,7 @@ class CRNNEncoder(nn.Layer):
rnn_input_size
=
i_size
else
:
rnn_input_size
=
layernorm_size
if
use_gru
==
True
:
if
use_gru
is
True
:
self
.
rnn
.
append
(
nn
.
GRU
(
input_size
=
rnn_input_size
,
...
...
@@ -113,7 +113,7 @@ class CRNNEncoder(nn.Layer):
if
init_state_h_box
is
not
None
:
init_state_list
=
None
if
self
.
use_gru
==
True
:
if
self
.
use_gru
is
True
:
init_state_h_list
=
paddle
.
split
(
init_state_h_box
,
self
.
num_rnn_layers
,
axis
=
0
)
init_state_list
=
init_state_h_list
...
...
@@ -139,7 +139,7 @@ class CRNNEncoder(nn.Layer):
x
=
self
.
fc_layers_list
[
i
](
x
)
x
=
F
.
relu
(
x
)
if
self
.
use_gru
==
True
:
if
self
.
use_gru
is
True
:
final_chunk_state_h_box
=
paddle
.
concat
(
final_chunk_state_list
,
axis
=
0
)
final_chunk_state_c_box
=
init_state_c_box
#paddle.zeros_like(final_chunk_state_h_box)
...
...
tests/deepspeech2_online_model_test.py
浏览文件 @
8d506270
...
...
@@ -146,7 +146,7 @@ class TestDeepSpeech2ModelOnline(unittest.TestCase):
self
.
assertEqual
(
paddle
.
allclose
(
eouts_by_chk
,
eouts
),
True
)
self
.
assertEqual
(
paddle
.
allclose
(
final_state_h_box
,
final_state_h_box_chk
),
True
)
if
use_gru
==
False
:
if
use_gru
is
False
:
self
.
assertEqual
(
paddle
.
allclose
(
final_state_c_box
,
final_state_c_box_chk
),
True
)
...
...
@@ -177,7 +177,7 @@ class TestDeepSpeech2ModelOnline(unittest.TestCase):
self
.
assertEqual
(
paddle
.
allclose
(
eouts_by_chk
,
eouts
),
True
)
self
.
assertEqual
(
paddle
.
allclose
(
final_state_h_box
,
final_state_h_box_chk
),
True
)
if
use_gru
==
False
:
if
use_gru
is
False
:
self
.
assertEqual
(
paddle
.
allclose
(
final_state_c_box
,
final_state_c_box_chk
),
True
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录