); } .color-scheme--dark .devsite-nav-icon[data-icon="alpha"]::before { content: url(data:image/svg+xml;utf8, ); } .devsite-nav-icon[data-icon="beta"]::before { content: url(data:image/svg+xml;utf8, ); } .color-scheme--dark .devsite-nav-icon[data-icon="beta"]::before { content: url(data:image/svg+xml;utf8, ); } .firebase-platform-label { font: 500 12px/24px Roboto,sans-serif; } /* Full-page platform selector dropdown */ /* Note: use menu variables in _elements.html file */ .full-page-selector-dropdown { border: none; position: relative; float: left; display: inline-block; } .full-page-selector-dropdown > .ds-selector-tabs { display: none; position: absolute; min-width: 160px; z-index: 1; } .full-page-selector-dropdown:hover .ds-selector-tabs { display: block; margin: 0; } .full-page-selector-dropdown:hover .kd-tabbutton { display: block; border: none; height: inherit; text-align: left; } .full-page-selector-dropdown:hover .kd-buttonbar { border: none; height: inherit; } .full-page-selector-dropdown h3:hover { color: var(--tenant-inverted-text-color); background-color: #039be5; } .full-page-selector-dropdown:hover .devsite-overflow-menu-button { display: none; } img.white-bg { padding: 5px; border-radius: 2px; background-color: #fff; }
Send feedback Use a custom TensorFlow Lite build Stay organized with collections Save and categorize content based on your preferences.
This page describes an old version of Firebase ML . In the newest version, you can use any version of TensorFlow Lite that works with your custom models, so the procedure below is unnecessary.
If you're an experienced ML developer and the pre-built TensorFlow Lite library doesn't meet your needs, you can use a custom TensorFlow Lite build with ML Kit. For example, you may want to add custom ops.
Prerequisites Bundling a custom TensorFlow Lite for Android Build the Tensorflow Lite AAR:
bazel build --cxxopt='--std=c++11' -c opt \ --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a \ //tensorflow/lite/java:tensorflow-lite This will generate an AAR file in bazel-genfiles/tensorflow/lite/java/
. Publish the custom Tensorflow Lite AAR to your local Maven repository:
mvn install:install-file -Dfile=bazel-genfiles/tensorflow/lite/java/tensorflow-lite.aar -DgroupId=org.tensorflow \ -DartifactId=tensorflow-lite -Dversion=0.1.100 -Dpackaging=aar Finally, in your app build.gradle
, override Tensorflow Lite with your custom version:
implementation ' org . tensorflow : tensorflow - lite : 0.1.100 '
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 2025-04-21 UTC.
Need to tell us more? [[["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 2025-04-21 UTC."],[],[]]