-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[TFLite] Support quantised SQUARED_DIFFERENCE operator #11249
Conversation
1bd04b4
to
79dfa0d
Compare
Add support and test to the SQUARED_DIFFERENCE operator in the TFLite frontend. Co-Authored-By: Shai Maor <Shai.Maor@arm.com>
79dfa0d
to
abc68f1
Compare
"TFlite quantized squared difference operator is not supported yet." | ||
) | ||
difference = self._convert_elemwise(_op.subtract, op) | ||
difference = self._convert_elemwise(_op.subtract, op, dequantize=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a check like the following?
difference = self._convert_elemwise(_op.subtract, op, dequantize=True) | |
difference = self._convert_elemwise(_op.subtract, op, dequantize=self.is_quantized(op)) |
@@ -286,6 +287,7 @@ def compare_tflite_with_tvm( | |||
# convert to tflite model | |||
converter = tf.lite.TFLiteConverter.from_session(sess, input_tensors, output_tensors) | |||
converter.experimental_new_converter = experimental_new_converter | |||
converter.experimental_new_quantizer = experimental_new_quantizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate line.
@@ -270,6 +270,7 @@ def compare_tflite_with_tvm( | |||
input_range=None, | |||
mode="graph_executor", | |||
experimental_new_converter=False, | |||
experimental_new_quantizer=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate line.
@@ -2135,6 +2138,7 @@ def __test_elemwise(in_data): | |||
quantized=True, | |||
input_range=input_range, | |||
experimental_new_converter=same_qnn_params, | |||
experimental_new_quantizer=experimental_new_quantizer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the previous line should be removed.
Closing in favour of #14667 |
Add support and test to the SQUARED_DIFFERENCE operator in the TFLite frontend.
Co-Authored-By: Shai Maor Shai.Maor@arm.com
cc @ekalda @NicolaLancellotti @Mousius @manupa-arm @areusch