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
30116072
Commit
30116072
authored
Apr 11, 2019
by
Khalique
Browse files
fix comments
parent
0b4f2f8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
src/tf/tf.cpp
src/tf/tf.cpp
+1
-4
No files found.
src/tf/tf.cpp
View file @
30116072
...
...
@@ -662,10 +662,6 @@ struct tf_parser
static
literal
parse_tensor
(
const
tensorflow
::
TensorProto
&
t
)
{
std
::
vector
<
size_t
>
dims
=
parse_dims
(
t
.
tensor_shape
());
// if(dims.empty())
// {
// dims = {1};
// }
size_t
shape_size
=
std
::
accumulate
(
dims
.
begin
(),
dims
.
end
(),
1
,
std
::
multiplies
<
size_t
>
());
if
(
!
t
.
tensor_content
().
empty
())
// has raw data
{
...
...
@@ -839,6 +835,7 @@ struct tf_parser
static
literal
create_literal
(
shape
::
type_t
shape_type
,
std
::
vector
<
size_t
>
dims
,
std
::
vector
<
T
>
data
)
{
// assume if explicit value is mentioned in protobuf and dim size <= 1, treat as scalar
if
(
dims
.
empty
()
or
(
dims
.
size
()
==
1
and
dims
.
front
()
==
1
))
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