tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] dhruvaray commented on a change in pull request #5329: [Relay][Frontend][TFLite] Add parser support for shape and range
Date Wed, 15 Apr 2020 04:30:00 GMT
dhruvaray commented on a change in pull request #5329: [Relay][Frontend][TFLite] Add parser
support for shape and range
URL: https://github.com/apache/incubator-tvm/pull/5329#discussion_r408574154
 
 

 ##########
 File path: tests/python/frontend/tflite/test_forward.py
 ##########
 @@ -650,6 +693,51 @@ def test_all_resize():
         _test_resize(tf.image.resize_nearest_neighbor, data, align_corners=False)
 
 
+#######################################################################
+# Range
+# -------------
+def test_range():
+    # tflite 1.13 convert method does not accept empty shapes
+    if package_version.parse(tf.VERSION) >= package_version.parse('1.14.0'):
+        tf.reset_default_graph()
+        with tf.Graph().as_default():
+            data = np.array([1, 18, 3], dtype=np.int32)
+            start = tf.placeholder(dtype=tf.int32, shape=(), name="start")
+            limit = tf.placeholder(dtype=tf.int32, shape=(), name="limit")
+            delta = tf.placeholder(dtype=tf.int32, shape=(), name="delta")
+            out = tf.range(start, limit, delta, tf.int32, name="range")
+            compare_tflite_with_tvm(
+                [x for x in np.nditer(data)],
+                ["start", "limit", "delta"],
+                [start,limit,delta],
+                [out],
+                mode="vm",
+                quantized=False
+        )
+#######################################################################
+# Shape
+# -------------
+def test_shape():
 
 Review comment:
   Fixed...

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


With regards,
Apache Git Services

Mime
View raw message