inadob commented on a change in pull request #5041: [TFLITE]DepthToSpace and 
SpaceToDepth support
URL: https://github.com/apache/incubator-tvm/pull/5041#discussion_r391560660
 
 

 ##########
 File path: tests/python/frontend/tflite/test_forward.py
 ##########
 @@ -1420,6 +1420,43 @@ def test_forward_prelu():
     _test_prelu(np.random.uniform(-5, 5, size=(1, 32, 32, 
3)).astype("float32"), np.full((3,), 0.2, dtype="float32"))
     _test_prelu(np.random.uniform(-5, 5, size=(1, 32, 32, 
3)).astype("float32"), np.full((1, 1, 3), 0.2, dtype="float32"))
 
+#######################################################################
+# DepthToSpace
+# ------------
+
+def _test_depthtospace(data, block_size):
+    """ One iteration of depth_to_space operation with given data and block 
size """
+
+    with tf.Graph().as_default():
+        in_data = array_ops.placeholder(shape=data.shape, dtype=data.dtype)
+        out = array_ops.depth_to_space(in_data, block_size)
+        compare_tflite_with_tvm(data, 'Placeholder:0', [in_data], [out])
+
+
+def test_forward_depthtospace():
+    if package_version.parse(tf.VERSION) >= package_version.parse('1.15.0'):
 
 Review comment:
   I think it will be nice to add a comment to say the check is done because of 
the fbs schema. Some of the other checks are done because of operators changing 
their behaviour between versions, so it's a good idea to distinguish them from 
those that were just added later in the schema.

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

Reply via email to