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
978b5905
Commit
978b5905
authored
Apr 11, 2019
by
Khalique
Browse files
fix comments
parent
30116072
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+1
-5
No files found.
src/onnx/onnx.cpp
View file @
978b5905
...
...
@@ -1361,11 +1361,6 @@ struct onnx_parser
static
literal
parse_tensor
(
const
onnx
::
TensorProto
&
t
)
{
std
::
vector
<
std
::
size_t
>
dims
(
t
.
dims
().
begin
(),
t
.
dims
().
end
());
// in case of scalar constants in onnx file, use dims=1 to fill initializer data
// if(dims.empty())
// {
// dims = {1};
// }
if
(
t
.
has_raw_data
())
{
const
std
::
string
&
s
=
t
.
raw_data
();
...
...
@@ -1443,6 +1438,7 @@ struct onnx_parser
static
literal
create_literal
(
shape
::
type_t
shape_type
,
std
::
vector
<
size_t
>
dims
,
const
char
*
data
)
{
// in case of scalar constants in onnx file, use dims=1 to fill initializer data
if
(
dims
.
empty
())
return
literal
{{
shape_type
,
{
1
},
{
0
}},
data
};
return
literal
{{
shape_type
,
dims
},
data
};
...
...
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