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
97aaadeb
Commit
97aaadeb
authored
7 years ago
by
masahi
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix onnx conv2d_transpose loading (#245)
parent
51a25982
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
nnvm/python/nnvm/frontend/onnx.py
+5
-2
5 additions, 2 deletions
nnvm/python/nnvm/frontend/onnx.py
with
5 additions
and
2 deletions
nnvm/python/nnvm/frontend/onnx.py
+
5
−
2
View file @
97aaadeb
...
...
@@ -64,7 +64,8 @@ def _elemwise(name):
assert
len
(
inputs
)
==
2
,
"
Math op take 2 inputs, {} given
"
.
format
(
len
(
inputs
))
op_name
=
_math_name_picker
(
name
)(
attr
)
axis
=
int
(
attr
.
get
(
'
axis
'
,
0
))
if
op_name
==
'
broadcast_add
'
and
inputs
[
0
].
attr
(
'
op_name
'
)
==
'
conv2d
'
:
conv_ops
=
[
"
conv2d
"
,
"
conv2d_transpose
"
]
if
op_name
==
'
broadcast_add
'
and
inputs
[
0
].
attr
(
'
op_name
'
)
in
conv_ops
:
# TODO(zhreshold): remove hard coded infershape
inputs
[
1
]
=
_sym
.
expand_dims
(
inputs
[
1
],
axis
=
axis
,
num_newaxis
=
2
)
return
get_nnvm_op
(
op_name
)(
*
inputs
)
...
...
@@ -101,8 +102,10 @@ def _conv():
def
_conv_transpose
():
def
_impl
(
inputs
,
attr
,
params
):
# get number of channels
channels
=
_infer_channels
(
inputs
[
1
],
params
)
channels
=
_infer_channels
(
inputs
[
1
],
params
,
True
)
attr
[
'
channels
'
]
=
channels
groups
=
attr
.
pop
(
'
group
'
)
attr
[
'
groups
'
]
=
groups
return
AttrCvt
(
op_name
=
_dimension_picker
(
'
conv
'
,
'
_transpose
'
),
transforms
=
{
...
...
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