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
05a5c170
Commit
05a5c170
authored
Jun 19, 2019
by
Zhi
Committed by
Tianqi Chen
Jun 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return mod from frontend for autotvm (#3401)
parent
917ad9f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
tutorials/autotvm/tune_relay_arm.py
+2
-1
tutorials/autotvm/tune_relay_cuda.py
+2
-1
tutorials/autotvm/tune_relay_mobile_gpu.py
+2
-1
tutorials/autotvm/tune_relay_x86.py
+2
-1
No files found.
tutorials/autotvm/tune_relay_arm.py
View file @
05a5c170
...
...
@@ -96,7 +96,8 @@ def get_network(name, batch_size):
# an example for mxnet model
from
mxnet.gluon.model_zoo.vision
import
get_model
block
=
get_model
(
'resnet18_v1'
,
pretrained
=
True
)
net
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
mod
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
net
=
mod
[
mod
.
entry_func
]
net
=
relay
.
Function
(
net
.
params
,
relay
.
nn
.
softmax
(
net
.
body
),
None
,
net
.
type_params
,
net
.
attrs
)
else
:
raise
ValueError
(
"Unsupported network: "
+
name
)
...
...
tutorials/autotvm/tune_relay_cuda.py
View file @
05a5c170
...
...
@@ -96,7 +96,8 @@ def get_network(name, batch_size):
# an example for mxnet model
from
mxnet.gluon.model_zoo.vision
import
get_model
block
=
get_model
(
'resnet18_v1'
,
pretrained
=
True
)
net
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
mod
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
net
=
mod
[
mod
.
entry_func
]
net
=
relay
.
Function
(
net
.
params
,
relay
.
nn
.
softmax
(
net
.
body
),
None
,
net
.
type_params
,
net
.
attrs
)
else
:
raise
ValueError
(
"Unsupported network: "
+
name
)
...
...
tutorials/autotvm/tune_relay_mobile_gpu.py
View file @
05a5c170
...
...
@@ -97,7 +97,8 @@ def get_network(name, batch_size):
# an example for mxnet model
from
mxnet.gluon.model_zoo.vision
import
get_model
block
=
get_model
(
'resnet18_v1'
,
pretrained
=
True
)
net
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
mod
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
net
=
mod
[
mod
.
entry_func
]
net
=
relay
.
Function
(
net
.
params
,
relay
.
nn
.
softmax
(
net
.
body
),
None
,
net
.
type_params
,
net
.
attrs
)
else
:
raise
ValueError
(
"Unsupported network: "
+
name
)
...
...
tutorials/autotvm/tune_relay_x86.py
View file @
05a5c170
...
...
@@ -64,7 +64,8 @@ def get_network(name, batch_size):
# an example for mxnet model
from
mxnet.gluon.model_zoo.vision
import
get_model
block
=
get_model
(
'resnet18_v1'
,
pretrained
=
True
)
net
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
mod
,
params
=
relay
.
frontend
.
from_mxnet
(
block
,
shape
=
{
'data'
:
input_shape
},
dtype
=
dtype
)
net
=
mod
[
mod
.
entry_func
]
net
=
relay
.
Function
(
net
.
params
,
relay
.
nn
.
softmax
(
net
.
body
),
None
,
net
.
type_params
,
net
.
attrs
)
else
:
raise
ValueError
(
"Unsupported network: "
+
name
)
...
...
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