From de7fd6852e7e3eb5088603f293e69e7f81f0890d Mon Sep 17 00:00:00 2001 From: Tlopex <68688494+tlopex@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:48:08 +0800 Subject: [PATCH 1/2] add quantized elu --- python/tvm/relay/frontend/tflite.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/tvm/relay/frontend/tflite.py b/python/tvm/relay/frontend/tflite.py index 4eaa8280c307..9862c2c5cc1f 100644 --- a/python/tvm/relay/frontend/tflite.py +++ b/python/tvm/relay/frontend/tflite.py @@ -1275,8 +1275,6 @@ def convert_neg(self, op): def convert_elu(self, op): """Convert TFLite ELU""" - if self.is_quantized(op): - raise tvm.error.OpNotImplemented("TFlite quantized ELU operator is not supported yet.") input_tensors = self.get_input_tensors(op) assert len(input_tensors) == 1, "input tensors length should be 1" From 9e190680061933cc001bd50348669151ae96f98a Mon Sep 17 00:00:00 2001 From: Tlopex <68688494+tlopex@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:50:46 +0800 Subject: [PATCH 2/2] add tests for quantized elu --- tests/python/frontend/tflite/test_forward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python/frontend/tflite/test_forward.py b/tests/python/frontend/tflite/test_forward.py index f1e2e28f086b..d033816b4a95 100644 --- a/tests/python/frontend/tflite/test_forward.py +++ b/tests/python/frontend/tflite/test_forward.py @@ -2436,7 +2436,7 @@ def test_all_unary_elemwise(): # from the converter that we need to provide a custom Tan operator # implementation. # _test_forward_unary_elemwise(_test_tan) - _test_forward_unary_elemwise(_test_elu, quantized=False) + _test_forward_unary_elemwise(_test_elu) #######################################################################