Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
71ffc2b6
Commit
71ffc2b6
authored
May 18, 2018
by
Tang, Cheng
Committed by
Tianqi Chen
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't rename onnx input tensors (#491)
parent
9f6e0c59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
nnvm/python/nnvm/frontend/onnx.py
+4
-8
No files found.
nnvm/python/nnvm/frontend/onnx.py
View file @
71ffc2b6
...
@@ -558,17 +558,13 @@ class GraphProto(object):
...
@@ -558,17 +558,13 @@ class GraphProto(object):
i_name
=
self
.
_parse_value_proto
(
i
)
i_name
=
self
.
_parse_value_proto
(
i
)
if
i_name
in
self
.
_params
:
if
i_name
in
self
.
_params
:
# i is a param instead of input
# i is a param instead of input
name_param
=
'param_{}'
.
format
(
self
.
_num_param
)
self
.
_num_param
+=
1
self
.
_num_param
+=
1
self
.
_params
[
name_param
]
=
self
.
_params
.
pop
(
i_name
)
self
.
_params
[
i_name
]
=
self
.
_params
.
pop
(
i_name
)
self
.
_nodes
[
name_param
]
=
_sym
.
Variable
(
self
.
_nodes
[
i_name
]
=
_sym
.
Variable
(
name
=
name_param
,
shape
=
self
.
_params
[
name_param
]
.
shape
)
name
=
i_name
,
shape
=
self
.
_params
[
i_name
]
.
shape
)
self
.
_renames
[
i_name
]
=
name_param
else
:
else
:
name_input
=
'input_{}'
.
format
(
self
.
_num_input
)
self
.
_num_input
+=
1
self
.
_num_input
+=
1
self
.
_nodes
[
name_input
]
=
_sym
.
Variable
(
name
=
name_input
)
self
.
_nodes
[
i_name
]
=
_sym
.
Variable
(
name
=
i_name
)
self
.
_renames
[
i_name
]
=
name_input
# construct nodes, nodes are stored as directed acyclic graph
# construct nodes, nodes are stored as directed acyclic graph
for
node
in
graph
.
node
:
for
node
in
graph
.
node
:
op_name
=
node
.
op_type
op_name
=
node
.
op_type
...
...
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