Attend the Women in ML Symposium on December 7 Register now


Stay organized with collections Save and categorize content based on your preferences.

Wraps tf.function into a callable function with TFLite compatibility checking.

Used in the notebooks

Used in the guide


    tf.TensorSpec(shape=[None], dtype=tf.float32)
def f(x):
    return tf.cosh(x)

result = f(tf.constant([0.0]))
# COMPATIBILITY WARNING: op 'tf.Cosh' require(s) "Select TF Ops" for model
# conversion for TensorFlow Lite.
# Op: tf.Cosh
#   - tensorflow/python/framework/
#   - tensorflow/python/ops/
#   - <stdin>:6

target A tf.function to decorate.
converter_target_spec target_spec of TFLite converter parameter.
**kwargs The keyword arguments of the decorator class _Compatible.

A callable object of tf.lite.experimental.authoring._Compatible.