Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
e9e12f03
Commit
e9e12f03
authored
6 years ago
by
Zhi
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Relay][doc] Update the description of returns in mxnet.py (#2309)
parent
10a9df22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/tvm/relay/frontend/mxnet.py
+5
-6
5 additions, 6 deletions
python/tvm/relay/frontend/mxnet.py
with
5 additions
and
6 deletions
python/tvm/relay/frontend/mxnet.py
+
5
−
6
View file @
e9e12f03
...
@@ -343,7 +343,7 @@ _convert_map.update({k : _rename(k) for k in _identity_list})
...
@@ -343,7 +343,7 @@ _convert_map.update({k : _rename(k) for k in _identity_list})
def
_from_mxnet_impl
(
symbol
,
shape_dict
,
dtype_info
):
def
_from_mxnet_impl
(
symbol
,
shape_dict
,
dtype_info
):
"""
Convert mxnet symbol to
nnvm implementa
tion.
"""
Convert mxnet symbol to
compatible relay Func
tion.
Reconstruct a relay Function by traversing the mxnet symbol.
Reconstruct a relay Function by traversing the mxnet symbol.
...
@@ -361,15 +361,14 @@ def _from_mxnet_impl(symbol, shape_dict, dtype_info):
...
@@ -361,15 +361,14 @@ def _from_mxnet_impl(symbol, shape_dict, dtype_info):
Returns:
Returns:
-------
-------
nnvm.sym.Symbol
func : tvm.relay.Function
Converted
symbol
Converted
relay Function
"""
"""
assert
symbol
is
not
None
assert
symbol
is
not
None
jgraph
=
json
.
loads
(
symbol
.
tojson
())
jgraph
=
json
.
loads
(
symbol
.
tojson
())
jnodes
=
jgraph
[
"
nodes
"
]
jnodes
=
jgraph
[
"
nodes
"
]
node_map
=
{}
node_map
=
{}
for
nid
,
node
in
enumerate
(
jnodes
):
for
nid
,
node
in
enumerate
(
jnodes
):
children
=
[
node_map
[
e
[
0
]][
e
[
1
]]
for
e
in
node
[
"
inputs
"
]]
children
=
[
node_map
[
e
[
0
]][
e
[
1
]]
for
e
in
node
[
"
inputs
"
]]
attrs
=
StrAttrsDict
(
node
.
get
(
"
attrs
"
,
{}))
attrs
=
StrAttrsDict
(
node
.
get
(
"
attrs
"
,
{}))
...
@@ -444,8 +443,8 @@ def from_mxnet(symbol,
...
@@ -444,8 +443,8 @@ def from_mxnet(symbol,
Returns
Returns
-------
-------
sym :
nn
vm.
Symbol
sym :
t
vm.
relay.Function
Compatible
nnvm symbol
Compatible
relay Function
params : dict of str to tvm.NDArray
params : dict of str to tvm.NDArray
The parameter dict to be used by nnvm
The parameter dict to be used by nnvm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment