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_r375419290
##########
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:
So before giving the final output, in_expr goes first through the padding
and then the result of the _op.pad is passed to _op.conv2d. My concern here is
that if we set pad_value=output_zero_point then wouldn't that be a problem
later in _op.conv2d where we do the operation with the input_tensor qnn
parameters. Correct me if I am wrong.
----------------------------------------------------------------
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