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
97aaadeb
Commit
97aaadeb
authored
Nov 22, 2017
by
masahi
Committed by
Tianqi Chen
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix onnx conv2d_transpose loading (#245)
parent
51a25982
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
nnvm/python/nnvm/frontend/onnx.py
+5
-2
No files found.
nnvm/python/nnvm/frontend/onnx.py
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
=
{
...
...
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