inadob commented on a change in pull request #4816: [TFLite] Using real image 
for QNN testing.
URL: https://github.com/apache/incubator-tvm/pull/4816#discussion_r375547063
 
 

 ##########
 File path: tests/python/frontend/tflite/test_forward.py
 ##########
 @@ -1100,16 +1117,26 @@ def test_forward_squeeze():
 # Pad
 # ---
 
-def _test_pad(data):
+def _test_pad(data, quantized=False):
     """ One iteration of PAD """
 
     assert len(data) == 2
 
     # Test with tensor and constant
     with tf.Graph().as_default():
-        in_data = [array_ops.placeholder(shape=data[0].shape, 
dtype=data[0].dtype, name='in')]
-        out = array_ops.pad(in_data[0], ops.convert_to_tensor(data[1], 
dtype=data[1].dtype))
-        compare_tflite_with_tvm([data[0]], ['in:0'], in_data, [out])
+        in_data = [array_ops.placeholder(shape=data[0].shape, dtype='float32', 
name='in')]
+
+        if quantized:
+            # fake_quant will keep the tensors in float32 until the conversion 
in the session
+            inq_data = 
[tf.quantization.fake_quant_with_min_max_args(in_data[0],
+                                                                     min=-100,
+                                                                     max=100,
+                                                                     
name="inq_0")]
 
 Review comment:
   Can you please rebase and pass the 'input_range' to the convertor as in here 
#4789

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