wyc-ruiker commented on a change in pull request #4926: 
[TFLITE][FRONTEND]Reduce_any op parsing support
URL: https://github.com/apache/incubator-tvm/pull/4926#discussion_r383114595
 
 

 ##########
 File path: tests/python/frontend/tflite/test_forward.py
 ##########
 @@ -1099,11 +1099,19 @@ def _test_reduce_sum(data, keep_dims=None):
     """ One iteration of reduce_sum """
     return _test_reduce(math_ops.reduce_sum, data, keep_dims)
 
+#######################################################################
+# Reduce_any
+# -----------
+
+def _test_reduce_any(data, keep_dims=None):
+    """ One iteration of reduce_any """
+    return _test_reduce(math_ops.reduce_any, data, keep_dims)
 
-def _test_forward_reduce(testop):
+
+def _test_forward_reduce(testop, dtype="float32"):
     """ Reduce """
-    data0 = [np.random.rand(16, 16, 16, 16).astype("float32"), None]
-    data1 = [np.random.rand(16, 16, 16, 16).astype("float32"), np.array([1, 
2], dtype=np.int32)]
+    data0 = [np.random.rand(16, 16, 16, 16).astype(dtype), None]
+    data1 = [np.random.rand(16, 16, 16, 16).astype(dtype), np.array([1, 2], 
dtype=np.int32)]
 
 Review comment:
   I'm a little confused. I think the elements of 
`np.random.rand().astype("bool")`  will be 1 in most cases.

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


With regards,
Apache Git Services

Reply via email to