Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
1d021468
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1d021468
编写于
4月 22, 2023
作者:
D
Dmitry Matveev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bump supported ONNX RT version to 1.14.1
- Existing tests pass with the ONNX models mentioned in tests.
上级
9ab0ff6c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
12 deletion
+10
-12
modules/gapi/src/backends/onnx/gonnxbackend.cpp
modules/gapi/src/backends/onnx/gonnxbackend.cpp
+6
-6
modules/gapi/test/infer/gapi_infer_onnx_test.cpp
modules/gapi/test/infer/gapi_infer_onnx_test.cpp
+4
-6
未找到文件。
modules/gapi/src/backends/onnx/gonnxbackend.cpp
浏览文件 @
1d021468
...
...
@@ -44,7 +44,8 @@ static std::string pdims(const std::vector<int64_t> &dims) {
struct
TensorInfo
{
TensorInfo
()
=
default
;
explicit
TensorInfo
(
const
Ort
::
TensorTypeAndShapeInfo
&
info
)
explicit
TensorInfo
(
const
Ort
::
ConstTensorTypeAndShapeInfo
&
info
)
:
dims
(
info
.
GetShape
())
,
type
(
info
.
GetElementType
())
,
is_dynamic
(
ade
::
util
::
find
(
dims
,
-
1
)
!=
dims
.
end
())
{
...
...
@@ -688,11 +689,10 @@ std::vector<TensorInfo> ONNXCompiled::getTensorInfo(TensorPosition pos) {
:
this_session
.
GetOutputTypeInfo
(
i
);
tensor_info
.
emplace_back
(
info
.
GetTensorTypeAndShapeInfo
());
char
*
name_p
=
pos
==
INPUT
?
this_session
.
GetInputName
(
i
,
allocator
)
:
this_session
.
GetOutputName
(
i
,
allocator
);
tensor_info
.
back
().
name
=
name_p
;
allocator
.
Free
(
name_p
);
Ort
::
AllocatedStringPtr
name_p
=
pos
==
INPUT
?
this_session
.
GetInputNameAllocated
(
i
,
allocator
)
:
this_session
.
GetOutputNameAllocated
(
i
,
allocator
);
tensor_info
.
back
().
name
=
std
::
string
(
name_p
.
get
());
}
return
tensor_info
;
...
...
modules/gapi/test/infer/gapi_infer_onnx_test.cpp
浏览文件 @
1d021468
...
...
@@ -332,9 +332,8 @@ public:
// Inputs Run params
std
::
vector
<
Ort
::
Value
>
in_tensors
;
for
(
size_t
i
=
0
;
i
<
num_in
;
++
i
)
{
char
*
in_node_name_p
=
session
.
GetInputName
(
i
,
allocator
);
in_node_names
.
emplace_back
(
in_node_name_p
);
allocator
.
Free
(
in_node_name_p
);
auto
in_node_name_p
=
session
.
GetInputNameAllocated
(
i
,
allocator
);
in_node_names
.
emplace_back
(
in_node_name_p
.
get
());
in_node_dims
=
toORT
(
ins
[
i
].
size
);
in_tensors
.
emplace_back
(
Ort
::
Value
::
CreateTensor
<
T
>
(
memory_info
,
const_cast
<
T
*>
(
ins
[
i
].
ptr
<
T
>
()),
...
...
@@ -345,9 +344,8 @@ public:
// Outputs Run params
if
(
custom_out_names
.
empty
())
{
for
(
size_t
i
=
0
;
i
<
num_out
;
++
i
)
{
char
*
out_node_name_p
=
session
.
GetOutputName
(
i
,
allocator
);
out_node_names
.
emplace_back
(
out_node_name_p
);
allocator
.
Free
(
out_node_name_p
);
auto
out_node_name_p
=
session
.
GetOutputNameAllocated
(
i
,
allocator
);
out_node_names
.
emplace_back
(
out_node_name_p
.
get
());
}
}
else
{
out_node_names
=
std
::
move
(
custom_out_names
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录