Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flaky] TFLite quantized conv test #6084

Merged
merged 6 commits into from
Jul 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions tests/python/frontend/tflite/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ def representative_data_gen():
def _test_tflite2_quantized_depthwise_convolution(input_shape, kernel_shape,
dilations, strides, padding, data_format, depth_multiplier):
"""One iteration of TFLite2 quantized depthwise convolution with given shapes and attributes"""

data_format = "channels_last" if "NHWC" else "channels_first"
data = np.random.uniform(0, 1, input_shape).astype('float32')
kernel = np.random.uniform(0, 1, kernel_shape).astype('float32')
Expand Down Expand Up @@ -914,13 +915,14 @@ def test_forward_convolution():
_test_tflite2_quantized_convolution([1, 17, 17, 19], [3, 3, 19, 19], [1, 1], [2, 2], 'VALID', 'NHWC')
_test_tflite2_quantized_convolution([1, 17, 17, 124], [1, 1, 124, 19], [1, 1], [1, 1], 'SAME', 'NHWC')

# Disable as tests are flaky - https://github.com/apache/incubator-tvm/issues/6064
# depthwise convolution
_test_tflite2_quantized_depthwise_convolution([1, 8, 8, 128], [1, 1, 128, 1], [1, 1], [1, 1],
'SAME', 'NHWC', 1)
_test_tflite2_quantized_depthwise_convolution([1, 17, 17, 12], [3, 3, 12, 1], [1, 1], [2, 2],
'VALID', 'NHWC', 1)
_test_tflite2_quantized_depthwise_convolution([1, 24, 24, 3], [7, 7, 3, 8], [1, 1], [2, 2],
'SAME', 'NHWC', 8)
# _test_tflite2_quantized_depthwise_convolution([1, 8, 8, 128], [1, 1, 128, 1], [1, 1], [1, 1],
# 'SAME', 'NHWC', 1)
# _test_tflite2_quantized_depthwise_convolution([1, 17, 17, 12], [3, 3, 12, 1], [1, 1], [2, 2],
# 'VALID', 'NHWC', 1)
# _test_tflite2_quantized_depthwise_convolution([1, 24, 24, 3], [7, 7, 3, 8], [1, 1], [2, 2],
# 'SAME', 'NHWC', 8)



Expand Down