tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] u99127 commented on a change in pull request #5497: [TFLite] Model importer to be compatible with tflite 2.1.0
Date Fri, 01 May 2020 21:18:23 GMT

u99127 commented on a change in pull request #5497:
URL: https://github.com/apache/incubator-tvm/pull/5497#discussion_r418742125



##########
File path: tests/python/frontend/tflite/test_forward.py
##########
@@ -79,12 +79,12 @@ def run_tvm_graph(tflite_model_buf, input_data, input_node, num_output=1,
target
     # TFLite.Model.Model has changed to TFLite.Model from 1.14 to 2.1
     try:
         import tflite.Model
-        tflite_model = tflite.Model.GetRootAsModel(tflite_model_buf, 0)
-    except ImportError:
-        raise ImportError("The tflite package must be installed")
+        tflite_model = tflite.Model.Model.GetRootAsModel(tflite_model_buf, 0)
     except AttributeError:
         import tflite
-        tflite_model = tflite.GetRootAsModel(tflite_model_buf, 0)
+        tflite_model = tflite.Mode.GetRootAsModel(tflite_model_buf, 0)

Review comment:
       NP, is this a case for specifically running the tutorials once when we migrate versions
of the frameworks ? 




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message