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
b08fe810
Commit
b08fe810
authored
Oct 24, 2019
by
Ina Dobreva
Committed by
Tianqi Chen
Oct 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add parser support for SUM tflite operator (#4182)
parent
e74a0eb6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
python/tvm/relay/frontend/tflite.py
+4
-0
tests/python/frontend/tflite/test_forward.py
+9
-0
No files found.
python/tvm/relay/frontend/tflite.py
View file @
b08fe810
...
...
@@ -82,6 +82,7 @@ class OperatorConverter(object):
'REDUCE_MAX'
:
self
.
_convert_reduce_max
,
'MEAN'
:
self
.
_convert_reduce_mean
,
'REDUCE_PROD'
:
self
.
_convert_reduce_prod
,
'SUM'
:
self
.
_convert_reduce_sum
,
'FULLY_CONNECTED'
:
self
.
convert_fully_connected
,
'PAD'
:
self
.
convert_pad
,
'PACK'
:
self
.
convert_pack
,
...
...
@@ -672,6 +673,9 @@ class OperatorConverter(object):
def
_convert_reduce_prod
(
self
,
op
):
return
self
.
_convert_reduce
(
_op
.
reduce
.
prod
,
op
)
def
_convert_reduce_sum
(
self
,
op
):
return
self
.
_convert_reduce
(
_op
.
reduce
.
sum
,
op
)
def
convert_fully_connected
(
self
,
op
):
"""Convert TFLite fully connected"""
try
:
...
...
tests/python/frontend/tflite/test_forward.py
View file @
b08fe810
...
...
@@ -714,6 +714,14 @@ def _test_reduce_prod(data, keep_dims=None):
""" One iteration of reduce_prod """
return
_test_reduce
(
math_ops
.
reduce_prod
,
data
,
keep_dims
)
#######################################################################
# Reduce_sum
# -----------
def
_test_reduce_sum
(
data
,
keep_dims
=
None
):
""" One iteration of reduce_sum """
return
_test_reduce
(
math_ops
.
reduce_sum
,
data
,
keep_dims
)
def
_test_forward_reduce
(
testop
):
""" Reduce """
...
...
@@ -732,6 +740,7 @@ def test_all_reduce():
_test_forward_reduce
(
_test_reduce_max
)
_test_forward_reduce
(
_test_reduce_mean
)
_test_forward_reduce
(
_test_reduce_prod
)
_test_forward_reduce
(
_test_reduce_sum
)
#######################################################################
...
...
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