Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OAID
Tengine
提交
36e51fd0
T
Tengine
项目概览
OAID
/
Tengine
9 个月 前同步成功
通知
53
Star
4429
Fork
1032
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
36e51fd0
编写于
12月 02, 2021
作者:
T
teng
提交者:
GitHub
12月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fix] fix typo (#1222)
* [fix] fix typo * [fix] fix typo
上级
d5077ee7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
tools/align_tool/align_with_onnx.py
tools/align_tool/align_with_onnx.py
+4
-4
tools/align_tool/readme.md
tools/align_tool/readme.md
+1
-1
tools/convert_tool/caffe/caffe2tengine.cpp
tools/convert_tool/caffe/caffe2tengine.cpp
+1
-1
tools/convert_tool/ncnn/ncnn2tengine.cpp
tools/convert_tool/ncnn/ncnn2tengine.cpp
+1
-1
tools/convert_tool/onnx/onnx2tengine.cpp
tools/convert_tool/onnx/onnx2tengine.cpp
+1
-1
tools/quantize/quant_save_graph.cpp
tools/quantize/quant_save_graph.cpp
+1
-1
未找到文件。
tools/align_tool/align_with_onnx.py
浏览文件 @
36e51fd0
...
@@ -133,7 +133,7 @@ class AlignOnnx():
...
@@ -133,7 +133,7 @@ class AlignOnnx():
save results of onnx
save results of onnx
:param outputs: list of outputs name
:param outputs: list of outputs name
:param result: onnx inference result
:param result: onnx inference result
:param const_name: onnx const name that sh
uo
ld not contain in output node
:param const_name: onnx const name that sh
ou
ld not contain in output node
:return:
:return:
"""
"""
check_make_folder
(
self
.
export_path
)
check_make_folder
(
self
.
export_path
)
...
@@ -150,7 +150,7 @@ class AlignOnnx():
...
@@ -150,7 +150,7 @@ class AlignOnnx():
def
_write_data
(
self
,
text_path
,
data
):
def
_write_data
(
self
,
text_path
,
data
):
"""
"""
too dificult to write, I don't want to do this again. :(
too dif
f
icult to write, I don't want to do this again. :(
If anyone has better way to realizing, pls tell me or PR.
If anyone has better way to realizing, pls tell me or PR.
"""
"""
shape_str
=
'{'
+
' '
.
join
([
str
(
i
)
for
i
in
data
.
shape
])
+
'}'
shape_str
=
'{'
+
' '
.
join
([
str
(
i
)
for
i
in
data
.
shape
])
+
'}'
...
@@ -280,7 +280,7 @@ class AlignOnnx():
...
@@ -280,7 +280,7 @@ class AlignOnnx():
try
:
try
:
sf_ndarray
=
result
[
outputs
.
index
(
name
[
0
])]
sf_ndarray
=
result
[
outputs
.
index
(
name
[
0
])]
except
:
except
:
print
(
f
"load onnx output f
iael
d
{
name
}
"
)
print
(
f
"load onnx output f
aile
d
{
name
}
"
)
return
return
# calculate distance
# calculate distance
...
@@ -327,7 +327,7 @@ def main():
...
@@ -327,7 +327,7 @@ def main():
print
(
"is save result : %s"
%
(
args
.
s
))
print
(
"is save result : %s"
%
(
args
.
s
))
print
(
"save text path : %s"
%
(
args
.
sp
))
print
(
"save text path : %s"
%
(
args
.
sp
))
print
(
"is align by layer : %s"
%
(
args
.
a
))
print
(
"is align by layer : %s"
%
(
args
.
a
))
print
(
"tengine ou
put path
: %s"
%
(
args
.
to
))
print
(
"tengine ou
tput path
: %s"
%
(
args
.
to
))
print
(
"tengine model : %s"
%
(
args
.
tm
))
print
(
"tengine model : %s"
%
(
args
.
tm
))
align
=
AlignOnnx
(
args
.
m
,
args
.
s
,
args
.
sp
,
args
.
a
,
args
.
to
,
args
.
tm
)
align
=
AlignOnnx
(
args
.
m
,
args
.
s
,
args
.
sp
,
args
.
a
,
args
.
to
,
args
.
tm
)
...
...
tools/align_tool/readme.md
浏览文件 @
36e51fd0
...
@@ -44,7 +44,7 @@ input onnx model : mnist_sim.onnx
...
@@ -44,7 +44,7 @@ input onnx model : mnist_sim.onnx
is save result : True
is save result : True
save text path : ./output_onnx
save text path : ./output_onnx
is align by layer : True
is align by layer : True
tengine ou
put path
: None
tengine ou
tput path
: None
tengine model : mnist.tmfile
tengine model : mnist.tmfile
onnx inference over
onnx inference over
-------------------------------------------------
-------------------------------------------------
...
...
tools/convert_tool/caffe/caffe2tengine.cpp
浏览文件 @
36e51fd0
...
@@ -1369,5 +1369,5 @@ void caffe_serializer::register_op_load()
...
@@ -1369,5 +1369,5 @@ void caffe_serializer::register_op_load()
op_load_map
[
"Reduction"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_REDUCTION
,
load_reduction
);
op_load_map
[
"Reduction"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_REDUCTION
,
load_reduction
);
}
}
/*
/*
* OPERA
OT
R REGISTER FUNCTION DEFINE FOR CAFFE SERIALIZER END
* OPERA
TO
R REGISTER FUNCTION DEFINE FOR CAFFE SERIALIZER END
*/
*/
tools/convert_tool/ncnn/ncnn2tengine.cpp
浏览文件 @
36e51fd0
...
@@ -1502,5 +1502,5 @@ void ncnn_serializer::register_op_load()
...
@@ -1502,5 +1502,5 @@ void ncnn_serializer::register_op_load()
op_load_map
[
"DeconvolutionDepthWise"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_DECONV
,
load_deconv
);
op_load_map
[
"DeconvolutionDepthWise"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_DECONV
,
load_deconv
);
}
}
/*
/*
* OPERA
OT
R REGISTER FUNCTION DEFINE FOR NCNN SERIALIZER END
* OPERA
TO
R REGISTER FUNCTION DEFINE FOR NCNN SERIALIZER END
*/
*/
tools/convert_tool/onnx/onnx2tengine.cpp
浏览文件 @
36e51fd0
...
@@ -2306,5 +2306,5 @@ void onnx_serializer::register_op_load()
...
@@ -2306,5 +2306,5 @@ void onnx_serializer::register_op_load()
op_load_map
[
"Gelu"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_GELU
,
load_no_param
);
op_load_map
[
"Gelu"
]
=
std
::
pair
<
int
,
op_load_t
>
(
OP_GELU
,
load_no_param
);
}
}
/*
/*
* OPERA
OT
R REGISTER FUNCTION DEFINE FOR ONNX SERIALIZER END
* OPERA
TO
R REGISTER FUNCTION DEFINE FOR ONNX SERIALIZER END
*/
*/
tools/quantize/quant_save_graph.cpp
浏览文件 @
36e51fd0
...
@@ -784,7 +784,7 @@ int save_graph_u8_perchannel(const char* model_file, const char* scale_file, con
...
@@ -784,7 +784,7 @@ int save_graph_u8_perchannel(const char* model_file, const char* scale_file, con
fprintf
(
stderr
,
"[Quant Tools Info]: Step 4, quantize activation tensor done.
\n
"
);
fprintf
(
stderr
,
"[Quant Tools Info]: Step 4, quantize activation tensor done.
\n
"
);
/* Set the params of ac
it
vation ir_tensor */
/* Set the params of ac
ti
vation ir_tensor */
for
(
int
i
=
0
;
i
<
ir_graph
->
tensor_num
;
i
++
)
for
(
int
i
=
0
;
i
<
ir_graph
->
tensor_num
;
i
++
)
{
{
struct
tensor
*
ir_tensor
=
ir_graph
->
tensor_list
[
i
];
struct
tensor
*
ir_tensor
=
ir_graph
->
tensor_list
[
i
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录