<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/lite/python/op_hint.py#L1292-L1328) |

Converts a graphdef with LiteOp hints into stub operations. (deprecated)

    tf.compat.v1.lite.experimental.convert_op_hints_to_stubs(
        session=None,
        graph_def=None,
        write_callback=(lambda graph_def, comments: None)
    )

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Please follow instructions under <https://www.tensorflow.org/lite/convert/operation_fusion> for operationfusion in tflite.

This is used to prepare for toco conversion of complex intrinsic usages.
Note: only one of session or graph_def should be used, not both.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `session` | A TensorFlow session that contains the graph to convert. |
| `graph_def` | A graph def that we should convert. |
| `write_callback` | A function pointer that can be used to write intermediate steps of graph transformation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A new graphdef with all ops contained in OpHints being replaced by a single op call with the right parameters. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If both session and graph_def are provided. |

<br />