FrozenGene commented on a change in pull request #6381:
URL: https://github.com/apache/incubator-tvm/pull/6381#discussion_r482808667
##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -2742,13 +2742,16 @@ def convert_transpose_conv(self, op):
assert out_channels == output_shape_value[3], \
"Output channel in the filter should match to channel in the
output_shape"
- # TF frontend supports 'SAME' padding for kernel 1x1 only. Lets do the
same here
if padding == Padding.SAME:
- assert (kernel_h, kernel_w) == (1, 1), \
- "SAME padding is supported for kernel (1,1) only"
+ pad_top, pad_bottom = get_pad_value(input_shape[1], kernel_h,
stride_h)
+ pad_left, pad_right = get_pad_value(input_shape[2], kernel_w,
stride_w)
+ pads = (pad_top, pad_left, pad_bottom, pad_right)
Review comment:
I think it is fine to use `padding` like we do
https://github.com/apache/incubator-tvm/blob/master/python/tvm/relay/frontend/tflite.py#L1906.
We could do `_op.nn.conv2d_transpose(..., padding=padding)`. I think it is a
common usage in the python.
----------------------------------------------------------------
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]