tf.lite.TargetSpec  |  TensorFlow v2.16.1 (original) (raw)

tf.lite.TargetSpec

Specification of target device used to optimize the model.

View aliases

Compat aliases for migration

SeeMigration guide for more details.

tf.compat.v1.lite.TargetSpec

tf.lite.TargetSpec(
    supported_ops=None,
    supported_types=None,
    experimental_select_user_tf_ops=None,
    experimental_supported_backends=None
)

Used in the notebooks

Used in the guide
TFLite Authoring Tool
Attributes
supported_ops Experimental flag, subject to change. Set of tf.lite.OpsSetoptions, where each option represents a set of operators supported by the target device. (default {tf.lite.OpsSet.TFLITE_BUILTINS}))
supported_types Set of tf.dtypes.DType data types supported on the target device. If initialized, optimization might be driven by the smallest type in this set. (default set())
experimental_select_user_tf_ops Experimental flag, subject to change. Set of user's TensorFlow operators' names that are required in the TensorFlow Lite runtime. These ops will be exported as select TensorFlow ops in the model (in conjunction with the tf.lite.OpsSet.SELECT_TF_OPS flag). This is an advanced feature that should only be used if the client is using TF ops that may not be linked in by default with the TF ops that are provided when using the SELECT_TF_OPS path. The client is responsible for linking these ops into the target runtime.
experimental_supported_backends Experimental flag, subject to change. Set containing names of supported backends. Currently only "GPU" is supported, more options will be available later.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.