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
45ef90c0
Commit
45ef90c0
authored
Jun 10, 2019
by
Alexander Pivovarov
Committed by
Tianqi Chen
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add all parameters to from_tensorflow docs (#3321)
parent
ce90f0d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
nnvm/python/nnvm/frontend/tensorflow.py
+14
-2
python/tvm/relay/frontend/tensorflow.py
+14
-2
No files found.
nnvm/python/nnvm/frontend/tensorflow.py
View file @
45ef90c0
...
...
@@ -1168,7 +1168,7 @@ class GraphProto(object):
self
.
_input_shapes
=
{}
def
from_tensorflow
(
self
,
graph
,
layout
=
"NHWC"
,
shape
=
None
,
outputs
=
None
):
"""Construct nnvm nodes from tensorflow
graph definition - GraphDef.
"""Construct nnvm nodes from tensorflow graph definition - GraphDef.
Follow the tensorflow graph definition to parse and convert it to NNVM.
Some of the assumptions listed below.
...
...
@@ -1194,6 +1194,9 @@ class GraphProto(object):
shape : Dictionary of input dimensions (Optional)
Graph level input shape dictionary.
outputs : List of output tensor names (Optional)
if not specified then the last node is assumed as graph output.
Returns
-------
sym : nnvm.sym.Symbol
...
...
@@ -1569,7 +1572,7 @@ class GraphProto(object):
return
inputs
def
from_tensorflow
(
graph
,
layout
=
"NHWC"
,
shape
=
None
,
outputs
=
None
):
"""
Load tensorflow graph which is a python tensorflow graph object into nnvm graph.
"""Load tensorflow graph which is a python tensorflow graph object into nnvm graph.
The companion parameters will be handled automatically.
Parameters
...
...
@@ -1577,6 +1580,15 @@ def from_tensorflow(graph, layout="NHWC", shape=None, outputs=None):
graph : GraphDef object
Tensorflow GraphDef
layout : target layout to be used (Optional)
NCHW only supported now to enable NHWC models on GPU.
shape : Dictionary of input dimensions (Optional)
Graph level input shape dictionary.
outputs : List of output tensor names (Optional)
if not specified then the last node is assumed as graph output.
Returns
-------
sym : nnvm.Symbol
...
...
python/tvm/relay/frontend/tensorflow.py
View file @
45ef90c0
...
...
@@ -1787,7 +1787,7 @@ class GraphProto(object):
self
.
_branches
=
{}
def
from_tensorflow
(
self
,
graph
,
layout
=
"NHWC"
,
shape
=
None
,
outputs
=
None
):
"""Construct relay nodes from tensorflow
graph definition - GraphDef.
"""Construct relay nodes from tensorflow graph definition - GraphDef.
Follow the tensorflow graph definition to parse and convert it to Relay.
Some of the assumptions listed below.
...
...
@@ -1813,6 +1813,9 @@ class GraphProto(object):
shape : Dictionary of input dimensions (Optional)
Graph level input shape dictionary.
outputs : List of output tensor names (Optional)
if not specified then the last node is assumed as graph output.
Returns
-------
sym : relay.op
...
...
@@ -2276,7 +2279,7 @@ class GraphProto(object):
def
from_tensorflow
(
graph
,
layout
=
"NHWC"
,
shape
=
None
,
outputs
=
None
):
"""
Load tensorflow graph which is a python tensorflow graph object into relay.
"""Load tensorflow graph which is a python tensorflow graph object into relay.
The companion parameters will be handled automatically.
Parameters
...
...
@@ -2284,6 +2287,15 @@ def from_tensorflow(graph, layout="NHWC", shape=None, outputs=None):
graph : GraphDef object
Tensorflow GraphDef
layout : target layout to be used (Optional)
NCHW only supported now to enable NHWC models on GPU.
shape : Dictionary of input dimensions (Optional)
Graph level input shape dictionary.
outputs : List of output tensor names (Optional)
if not specified then the last node is assumed as graph output.
Returns
-------
sym : relay.op
...
...
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