Skip to content

Commit

Permalink
Add the missing doc strings in elemwise ops
Browse files Browse the repository at this point in the history
  • Loading branch information
inadob committed Jan 28, 2020
1 parent 12efe01 commit 68add63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/tvm/relay/frontend/tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,15 @@ def convert_div(self, op):
return self._convert_elemwise(_op.divide, op)

def convert_pow(self, op):
"""Convert TFLite POW"""
# Check if the input tensor is quantized, call QNN op
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized POW operator is not supported yet.')
return self._convert_elemwise(_op.power, op)

def convert_squared_difference(self, op):
"""Convert TFLite SQUARED DIFFERENCE"""
# Check if the input tensor is quantized, call QNN op
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
Expand All @@ -732,51 +734,59 @@ def convert_squared_difference(self, op):
return out

def convert_maximum(self, op):
"""Convert TFLite MAXIMUM"""
# Check if the input tensor is quantized, call QNN op
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized MAXIMUM operator is not supported yet.')
return self._convert_elemwise(_op.maximum, op)

def convert_minimum(self, op):
"""Convert TFLite MINIMUM"""
# Check if the input tensor is quantized, call QNN op
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized MINIMUM operator is not supported yet.')
return self._convert_elemwise(_op.minimum, op)

def convert_greater(self, op):
"""Convert TFLite GREATER"""
# Check if the input tensor is quantized, call QNN op
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized GREATER operator is not supported yet.')
return self._convert_elemwise(_op.greater, op)

def convert_greater_equal(self, op):
"""Convert TFLite GREATER_EQUAL"""
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized GREATER_EQUAL operator is not supported yet.')
return self._convert_elemwise(_op.greater_equal, op)

def convert_less(self, op):
"""Convert TFLite LESS"""
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized LESS operator is not supported yet.')
return self._convert_elemwise(_op.less, op)

def convert_less_equal(self, op):
"""Convert TFLite LESS_EQUAL"""
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized LESS_EQUAL operator is not supported yet.')
return self._convert_elemwise(_op.less_equal, op)

def convert_equal(self, op):
"""Convert TFLite EQUAL"""
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized EQUAL operator is not supported yet.')
return self._convert_elemwise(_op.equal, op)

def convert_not_equal(self, op):
"""Convert TFLite NOT_EQUAL"""
if self.is_quantized(op):
raise tvm.error.OpNotImplemented(
'TFlite quantized NOT_EQUAL operator is not supported yet.')
Expand Down

0 comments on commit 68add63

Please sign in to comment.