Introducing LiteRT : Google's high-performance runtime for on-device AI, formerly known as TensorFlow Lite.
Learn more
Send feedback
tf.lite.experimental.load_delegate
Stay organized with collections
Save and categorize content based on your preferences.
Returns loaded Delegate object.
tf . lite . experimental . load_delegate (
library , options = None
)
Example usage:
import tensorflow as tf
try :
delegate = tf . lite . experimental . load_delegate ( 'delegate . so ')
except ValueError :
// Fallback to CPU
if delegate :
interpreter = tf . lite . Interpreter (
model_path = 'model . tflite ',
experimental_delegates = [ delegate ])
else :
interpreter = tf . lite . Interpreter ( model_path = 'model . tflite ')
This is typically used to leverage EdgeTPU for running TensorFlow Lite models.
For more information see: https://coral.ai/docs/edgetpu/tflite-python/
Args
library
Name of shared library containing the
TfLiteDelegate .
options
Dictionary of options that are required to load the delegate. All
keys and values in the dictionary should be convertible to str. Consult
the documentation of the specific delegate for required and legal options.
(default None)
Raises
ValueError
Delegate failed to load.
RuntimeError
If delegate loading is used on unsupported platform.
Send feedback
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.
Last updated 2024-09-04 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-04 UTC."],[],[]]