Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
c90be853
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看板
提交
c90be853
编写于
6月 10, 2022
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
to onnx
上级
6477b6f3
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
2531 addition
and
2 deletion
+2531
-2
.gitignore
.gitignore
+3
-0
speechx/examples/ds2_ol/onnx/.gitignore
speechx/examples/ds2_ol/onnx/.gitignore
+1
-0
speechx/examples/ds2_ol/onnx/local/onnx_clone.sh
speechx/examples/ds2_ol/onnx/local/onnx_clone.sh
+6
-0
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
+2517
-0
speechx/examples/ds2_ol/onnx/local/tonnx.sh
speechx/examples/ds2_ol/onnx/local/tonnx.sh
+1
-1
speechx/examples/ds2_ol/onnx/run.sh
speechx/examples/ds2_ol/onnx/run.sh
+3
-1
未找到文件。
.gitignore
浏览文件 @
c90be853
...
@@ -39,6 +39,9 @@ tools/env.sh
...
@@ -39,6 +39,9 @@ tools/env.sh
tools/openfst-1.8.1/
tools/openfst-1.8.1/
tools/libsndfile/
tools/libsndfile/
tools/python-soundfile/
tools/python-soundfile/
tools/onnx
tools/onnxruntime
tools/Paddle2ONNX
speechx/fc_patch/
speechx/fc_patch/
...
...
speechx/examples/ds2_ol/onnx/.gitignore
浏览文件 @
c90be853
data
data
log
speechx/examples/ds2_ol/onnx/local/onnx_clone.sh
0 → 100644
浏览文件 @
c90be853
#!/bin/bash
git clone https://github.com/onnx/onnx.git
git clone https://github.com/microsoft/onnxruntime.git
git clone https://github.com/PaddlePaddle/Paddle2ONNX.git
\ No newline at end of file
speechx/examples/ds2_ol/onnx/local/onnx_infer_shape.py
0 → 100644
浏览文件 @
c90be853
此差异已折叠。
点击以展开。
speechx/examples/ds2_ol/onnx/local/tonnx.sh
浏览文件 @
c90be853
...
@@ -21,5 +21,5 @@ paddle2onnx --model_dir $dir \
...
@@ -21,5 +21,5 @@ paddle2onnx --model_dir $dir \
--save_file
$output
\
--save_file
$output
\
--enable_dev_version
True
\
--enable_dev_version
True
\
--opset_version
9
\
--opset_version
9
\
--enable_onnx_checker
True
\
--enable_onnx_checker
True
\ No newline at end of file
speechx/examples/ds2_ol/onnx/run.sh
浏览文件 @
c90be853
...
@@ -28,6 +28,7 @@ param=avg_1.jit.pdiparams
...
@@ -28,6 +28,7 @@ param=avg_1.jit.pdiparams
output_names
=
softmax_0.tmp_0,tmp_5,concat_0.tmp_0,concat_1.tmp_0
output_names
=
softmax_0.tmp_0,tmp_5,concat_0.tmp_0,concat_1.tmp_0
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# prune model by outputs
mkdir
-p
$exp
/prune
mkdir
-p
$exp
/prune
# prune model deps on output_names.
# prune model deps on output_names.
...
@@ -36,8 +37,8 @@ fi
...
@@ -36,8 +37,8 @@ fi
input_shape_dict
=
"{'audio_chunk':[1,-1,161], 'audio_chunk_lens':[1], 'chunk_state_c_box':[5, 1, 1024], 'chunk_state_h_box':[5,1,1024]}"
input_shape_dict
=
"{'audio_chunk':[1,-1,161], 'audio_chunk_lens':[1], 'chunk_state_c_box':[5, 1, 1024], 'chunk_state_h_box':[5,1,1024]}"
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# infer shape by new shape
mkdir
-p
$exp
/shape
mkdir
-p
$exp
/shape
python3
local
/pd_infer_shape.py
\
python3
local
/pd_infer_shape.py
\
--model_dir
$dir
\
--model_dir
$dir
\
--model_filename
$model
\
--model_filename
$model
\
...
@@ -47,5 +48,6 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ];then
...
@@ -47,5 +48,6 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ];then
fi
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
# to onnx
./local/tonnx.sh
$dir
$model
$param
$exp
/model.onnx
./local/tonnx.sh
$dir
$model
$param
$exp
/model.onnx
fi
fi
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录