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



##########
File path: tests/python/frontend/tflite/test_forward.py
##########
@@ -1281,70 +1287,72 @@ def test_all_unary_elemwise():
 # Element-wise
 # ------------
 
-def _test_elemwise(math_op, data, fused_activation_function=None, 
quantized=False, qnn_op=None):
+def _test_elemwise(math_op, data, fused_activation_function=None, 
quantized=False, qnn_op=None, same_qnn_params=False):
     """ One iteration of elemwise """
 
     assert len(data) == 2
 
     # Test with two tensors
-    with tf.Graph().as_default():
-        in_data = [array_ops.placeholder(shape=data[0].shape, dtype='float32', 
name='in_0'),
-                   array_ops.placeholder(shape=data[1].shape, dtype='float32', 
name='in_1')]
-
-        if quantized:
+    def __test_elemwise( in_data ):

Review comment:
       My suggestion would be to use the TFLite 2.1 way of creating 
quantization tests. I think its cleaner.
   
   An example for Relu is here
   
https://github.com/apache/incubator-tvm/blob/c9c77c6b76f7cff3bc6afbf9d3ef2200e3fdbb91/tests/python/frontend/tflite/test_forward.py#L2072-L2089




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