Skip to content

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 [email protected]

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 <[email protected]>
@leandron leandron force-pushed the tflite_squared_difference branch from 79dfa0d to abc68f1 Compare May 12, 2022 08:50
"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))

# 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.

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.

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