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
6b2590e3
Commit
6b2590e3
authored
Mar 25, 2019
by
Gemfield
Committed by
Tianqi Chen
Mar 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance upsample operator to adapt onnx opset version 9 (#2840)
parent
2df3364b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
python/tvm/relay/frontend/onnx.py
+6
-1
No files found.
python/tvm/relay/frontend/onnx.py
View file @
6b2590e3
...
...
@@ -447,8 +447,13 @@ class Upsample(OnnxOpConverter):
"""
@classmethod
def
_impl_v
7
(
cls
,
inputs
,
attr
,
params
):
def
_impl_v
9
(
cls
,
inputs
,
attr
,
params
):
scales
=
attr
.
get
(
'scales'
)
if
not
scales
:
#Here we are going to higher OPSET version.
assert
len
(
inputs
)
==
2
,
"Upsample op take 2 inputs, {} given"
.
format
(
len
(
inputs
))
scales
=
params
[
inputs
[
1
]
.
name_hint
]
.
asnumpy
()
inputs
=
inputs
[:
1
]
assert
len
(
scales
)
==
4
and
scales
[
0
]
==
1.0
and
scales
[
1
]
==
1.0
and
scales
[
2
]
==
scales
[
3
]
mode
=
attr
.
get
(
'mode'
)
if
mode
==
b
'nearest'
:
...
...
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