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

 ##########
 File path: python/tvm/relay/frontend/tflite.py
 ##########
 @@ -1124,10 +1124,14 @@ def convert_conv(self, op, conv_type):
             pad_left, pad_right = get_pad_value(input_w, dilated_kernel_w, 
stride_w)
             do_pad = not (pad_top == 0 and pad_bottom == 0 and pad_left == 0 
and pad_right == 0)
             if do_pad:
+                pad_value = 0
+                if input_tensor.qnn_params:
+                    pad_value = 
get_scalar_from_constant(input_tensor.qnn_params['zero_point'])
                 in_expr = _op.nn.pad(data=in_expr, pad_width=((0, 0),
                                                               (pad_top, 
pad_bottom),
                                                               (pad_left, 
pad_right),
-                                                              (0, 0)))
+                                                              (0, 0)), 
pad_value=float(pad_value))
 
 Review comment:
   > Must this be float(pad_value)? For QNN, this is int type. Does our pad 
require it be float type?
   
   Pad only takes float value for now. Internaly it gets converted to the input 
dtype. So, this is fine for now.

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