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
33ac2037
Commit
33ac2037
authored
Mar 07, 2018
by
Siva
Committed by
Tianqi Chen
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sum operator for ONNX. (#386)
parent
4794f3d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
nnvm/python/nnvm/frontend/onnx.py
+10
-1
No files found.
nnvm/python/nnvm/frontend/onnx.py
View file @
33ac2037
...
...
@@ -235,6 +235,15 @@ def _pad():
custom_check
=
lambda
attrs
:
attrs
.
get
(
'mode'
)
==
'constant'
)(
inputs
,
attr
)
return
_impl
def
_sum
():
def
_impl
(
inputs
,
attr
,
params
):
# Onnx Sum Operator
for
in_index
in
range
(
len
(
inputs
)
-
1
):
inputs
[
in_index
+
1
]
=
_sym
.
broadcast_add
(
inputs
[
in_index
],
inputs
[
in_index
+
1
])
return
inputs
[
len
(
inputs
)
-
1
]
return
_impl
# compatible operators that do NOT require any conversion.
_identity_list
=
[]
...
...
@@ -296,7 +305,7 @@ _convert_map = {
# 'HardSigmoid'
# 'Max' : this is the elemwise maximum
# 'Min' : this is the elemwise minimum
# 'Sum' : elemwise sum
'Sum'
:
_sum
(),
# 'Mean'
# 'Clip'
# softmax default axis is different in onnx
...
...
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