Skip to content

Relu0To1 op implementation#33299

Open
akodanka wants to merge 1 commit intoopenvinotoolkit:masterfrom
akodanka:tfl_relu0To1
Open

Relu0To1 op implementation#33299
akodanka wants to merge 1 commit intoopenvinotoolkit:masterfrom
akodanka:tfl_relu0To1

Conversation

@akodanka
Copy link
Contributor

Details:

  • item1
  • ...

Tickets:

Signed-off-by: Anoob Anto Kodankandath <[email protected]>
@akodanka akodanka requested a review from a team as a code owner December 18, 2025 09:45
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Dec 18, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalIntelPR External contributor from Intel label Dec 18, 2025
{"REDUCE_PROD", translate_reduce_op<opset10::ReduceProd>},
{"RELU", translate_unary<opset10::Relu>},
// RELU_0_TO_1
{"RELU_0_TO_1", DEQUANTIZE_INPUTS(translate_relu_0_to_1_op)},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have layer test for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying to add layer test for RELU_0_TO_1 op, I noticed the tflite model generated does not have that op.
When I tried the EMBEDDING_LOOKUP layer_test for reference, I noticed even that test is not hitting the op implementation, but rather taking the gather op path.

For debugging, I tried adding converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS] along with the tf.nn.embedding_lookup().
But it still generated GATHER op, not EMBEDDING_LOOKUP.

As I understand, this is the TFLiteLayerTest pipeline:
TensorFlow Graph => TFLite Converter => TFLite Model
This requires:

  1. The operation must exist in TensorFlow's op registry
  2. The TFLite converter must know how to map it to a TFLite builtin op
  3. The TFLite builtin op must exist in the TFLite schema

Issues with these ops:
EMBEDDING_LOOKUP: There is no EmbeddingLookup operation in TensorFlow's core ops. The tf.nn.embedding_lookup() function creates a Gather op.
RELU_0_TO_1: This op doesn't have a corresponding TensorFlow operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments