inadob commented on a change in pull request #4822: [Frontend][TFLite] Add
MIRROR_PAD operator
URL: https://github.com/apache/incubator-tvm/pull/4822#discussion_r375339453
##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -1422,10 +1423,48 @@ def convert_pad(self, op):
# convert list of lists to tuple of tuples
paddings = tuple(tuple(l) for l in pad_list)
- # Use default pad_value 0 because TFLite does not support
constant_values parameter
+ # Use default pad_value 0 because TFLite PAD does not support
constant_values parameter
out = _op.nn.pad(in_expr, paddings)
return out
+ def convert_mirror_pad(self, op):
+ """Convert TFLite MIRROR_PAD"""
+ try:
+ from tflite.Operator import Operator
+ from tflite.BuiltinOptions import BuiltinOptions
+ from tflite.MirrorPadOptions import MirrorPadOptions
+ except ImportError:
+ raise ImportError("The tflite package must be installed")
+
+ # the quantized form MirrorPad is not yet implemented in TFLite.
+ if self.is_quantized(op):
+ raise tvm.error.OpNotImplemented(
Review comment:
If TFLite doesn't support uint8 input then I don't think we can write qnn
implemenation at that point.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services