[TFLite] Support quantised SQUARED_DIFFERENCE operator#11249
Closed
leandron wants to merge 1 commit intoapache:mainfrom
Closed
[TFLite] Support quantised SQUARED_DIFFERENCE operator#11249leandron wants to merge 1 commit intoapache:mainfrom
leandron wants to merge 1 commit intoapache:mainfrom
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) |
Contributor
There was a problem hiding this comment.
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)) |
| # 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 |
| input_range=None, | ||
| mode="graph_executor", | ||
| experimental_new_converter=False, | ||
| experimental_new_quantizer=False, |
| quantized=True, | ||
| input_range=input_range, | ||
| experimental_new_converter=same_qnn_params, | ||
| experimental_new_quantizer=experimental_new_quantizer, |
Contributor
There was a problem hiding this comment.
I think the previous line should be removed.
Contributor
Author
|
Closing in favour of #14667 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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