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

[TFLite] Support quantised SQUARED_DIFFERENCE operator #11249

Closed
wants to merge 1 commit into from

Conversation

leandron
Copy link
Contributor

@leandron leandron commented May 9, 2022

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

@github-actions github-actions bot requested review from Mousius and areusch May 9, 2022 16:31
@github-actions github-actions bot requested a review from manupak May 9, 2022 16:31
@leandron leandron force-pushed the tflite_squared_difference branch 3 times, most recently from 1bd04b4 to 79dfa0d Compare May 11, 2022 11:02
Add support and test to the SQUARED_DIFFERENCE operator in
the TFLite frontend.

Co-Authored-By: Shai Maor <Shai.Maor@arm.com>
"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)
Copy link
Contributor

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?

Suggested change
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
Copy link
Contributor

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,
Copy link
Contributor

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,
Copy link
Contributor

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.

@areusch areusch added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it and removed needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it labels Oct 19, 2022
@leandron
Copy link
Contributor Author

Closing in favour of #14667

@leandron leandron closed this Apr 19, 2023
@leandron leandron deleted the tflite_squared_difference branch April 19, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants