Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
42921d5e
Commit
42921d5e
authored
Sep 19, 2018
by
Paul
Browse files
Formatting
parent
2bda6735
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+8
-4
No files found.
src/onnx/onnx.cpp
View file @
42921d5e
...
@@ -351,9 +351,10 @@ struct onnx_parser
...
@@ -351,9 +351,10 @@ struct onnx_parser
if
(
node
.
name
().
empty
())
if
(
node
.
name
().
empty
())
{
{
std
::
string
generated
=
"migraph_unnamed_node"
;
std
::
string
generated
=
"migraph_unnamed_node"
;
return
std
::
accumulate
(
node
.
output
().
begin
(),
node
.
output
().
end
(),
generated
,
[](
auto
x
,
auto
y
)
{
return
std
::
accumulate
(
node
.
output
().
begin
(),
return
x
+
"_"
+
y
;
node
.
output
().
end
(),
});
generated
,
[](
auto
x
,
auto
y
)
{
return
x
+
"_"
+
y
;
});
}
}
return
node
.
name
();
return
node
.
name
();
}
}
...
@@ -487,7 +488,10 @@ struct onnx_parser
...
@@ -487,7 +488,10 @@ struct onnx_parser
}
}
std
::
vector
<
std
::
size_t
>
dims
;
std
::
vector
<
std
::
size_t
>
dims
;
auto
&&
tensor_dims
=
t
.
tensor_type
().
shape
().
dim
();
auto
&&
tensor_dims
=
t
.
tensor_type
().
shape
().
dim
();
std
::
transform
(
tensor_dims
.
begin
(),
tensor_dims
.
end
(),
std
::
back_inserter
(
dims
),
[](
auto
&&
d
)
{
return
d
.
dim_value
();
});
std
::
transform
(
tensor_dims
.
begin
(),
tensor_dims
.
end
(),
std
::
back_inserter
(
dims
),
[](
auto
&&
d
)
{
return
d
.
dim_value
();
});
return
{
shape_type
,
dims
};
return
{
shape_type
,
dims
};
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment