anijain2305 commented on a change in pull request #5848:
URL: https://github.com/apache/incubator-tvm/pull/5848#discussion_r448593312



##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -651,12 +701,43 @@ def convert_shape(self, op):
 
     def convert_relu(self, op):
         """Convert TFLite ReLU"""
+        try:
+            from tflite.ActivationFunctionType import ActivationFunctionType
+        except ImportError:
+            raise ImportError("The tflite package must be installed")
+

Review comment:
       Tried this but it failed, the scope of imports is limited to the 
functions in which they are imported.

##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -692,6 +773,11 @@ def _hard_swish(data):
 
     def convert_relu6(self, op):
         """Convert TFLite ReLU6"""
+        try:
+            from tflite.ActivationFunctionType import ActivationFunctionType

Review comment:
       Same as before




----------------------------------------------------------------
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]


Reply via email to