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
9fc9d66e
Commit
9fc9d66e
authored
Oct 26, 2018
by
Zhennan Qin
Committed by
Tianqi Chen
Oct 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix load subgraph from json (#1980)
parent
4bb40baa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
nnvm/src/pass/saveload_json.cc
+7
-7
No files found.
nnvm/src/pass/saveload_json.cc
View file @
9fc9d66e
...
...
@@ -215,13 +215,6 @@ std::shared_ptr<Symbol> JSONGraph2Symbol(const JSONGraph &jgraph, bool no_parse)
for
(
uint32_t
nid
:
n
.
control_deps
)
{
n
.
node
->
control_deps
.
push_back
(
jgraph
.
nodes
[
nid
].
node
);
}
// rebuild attribute parser
if
(
!
no_parse
&&
n
.
node
->
op
()
!=
nullptr
&&
n
.
node
->
op
()
->
attr_parser
!=
nullptr
)
{
n
.
node
->
op
()
->
attr_parser
(
&
(
n
.
node
->
attrs
));
}
else
if
(
!
no_parse
&&
n
.
node
->
is_variable
())
{
n
.
node
->
attrs
.
parsed
=
Symbol
::
CreateVariable
(
n
.
node
->
attrs
.
name
).
outputs
[
0
].
node
->
attrs
.
parsed
;
}
for
(
const
JSONGraph
&
subgraph
:
n
.
subgraphs
)
{
// The "no_parse" option here, is to be compatible with
// commit cfd3075e85807dcd8f9534c37e053583dee87524
...
...
@@ -230,6 +223,13 @@ std::shared_ptr<Symbol> JSONGraph2Symbol(const JSONGraph &jgraph, bool no_parse)
// incubator-mxnet/src/nnvm/legacy_json_util.cc:UpgradeJSON_Parse
n
.
node
->
attrs
.
subgraphs
.
push_back
(
JSONGraph2Symbol
(
subgraph
,
false
));
}
// rebuild attribute parser
if
(
!
no_parse
&&
n
.
node
->
op
()
!=
nullptr
&&
n
.
node
->
op
()
->
attr_parser
!=
nullptr
)
{
n
.
node
->
op
()
->
attr_parser
(
&
(
n
.
node
->
attrs
));
}
else
if
(
!
no_parse
&&
n
.
node
->
is_variable
())
{
n
.
node
->
attrs
.
parsed
=
Symbol
::
CreateVariable
(
n
.
node
->
attrs
.
name
).
outputs
[
0
].
node
->
attrs
.
parsed
;
}
}
// consistency check
for
(
uint32_t
nid
:
jgraph
.
arg_nodes
)
{
...
...
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