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
21353e5f
Commit
21353e5f
authored
Sep 25, 2019
by
Ina Dobreva
Committed by
Tianqi Chen
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parser support for GREATER tflite operator (#3963)
add test for GREATER
parent
b410df8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
python/tvm/relay/frontend/tflite.py
+4
-0
tests/python/frontend/tflite/test_forward.py
+8
-0
No files found.
python/tvm/relay/frontend/tflite.py
View file @
21353e5f
...
...
@@ -74,6 +74,7 @@ class OperatorConverter(object):
'POW'
:
self
.
convert_pow
,
'MAXIMUM'
:
self
.
convert_maximum
,
'MINIMUM'
:
self
.
convert_minimum
,
'GREATER'
:
self
.
convert_greater
,
'REDUCE_MIN'
:
self
.
_convert_reduce_min
,
'REDUCE_MAX'
:
self
.
_convert_reduce_max
,
'MEAN'
:
self
.
_convert_reduce_mean
,
...
...
@@ -456,6 +457,9 @@ class OperatorConverter(object):
def
convert_minimum
(
self
,
op
):
return
self
.
_convert_elemwise
(
_op
.
minimum
,
op
)
def
convert_greater
(
self
,
op
):
return
self
.
_convert_elemwise
(
_op
.
greater
,
op
)
def
_convert_reduce
(
self
,
relay_op
,
op
):
"""Generic method to Convert TFLite MEAN operators"""
try
:
...
...
tests/python/frontend/tflite/test_forward.py
View file @
21353e5f
...
...
@@ -597,6 +597,13 @@ def _test_maximum(data):
def
_test_minimum
(
data
):
""" One iteration of minimum """
return
_test_elemwise
(
math_ops
.
minimum
,
data
)
#######################################################################
# Greater
# -------
def
_test_greater
(
data
):
""" One iteration of greater """
return
_test_elemwise
(
math_ops
.
greater
,
data
)
def
_test_forward_elemwise
(
testop
):
""" Elewise"""
...
...
@@ -623,6 +630,7 @@ def test_all_elemwise():
_test_forward_elemwise
(
_test_pow
)
_test_forward_elemwise
(
_test_maximum
)
_test_forward_elemwise
(
_test_minimum
)
_test_forward_elemwise
(
_test_greater
)
#######################################################################
# Reduce
...
...
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