Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Mô hình tùy chỉnh
plat_iosplat_android
Nếu bạn là nhà phát triển máy học có kinh nghiệm và các mô hình tạo sẵn của Bộ công cụ học máy không
đáp ứng nhu cầu của mình, bạn có thể sử dụng
Mô hình TensorFlow Lite có
Bộ công cụ học máy.
Lưu trữ các mô hình TensorFlow Lite bằng Firebase hoặc đóng gói các mô hình đó với ứng dụng của bạn.
Sau đó, hãy sử dụng SDK Bộ công cụ học máy để tiến hành suy luận bằng cách sử dụng dữ liệu có sẵn tốt nhất
của mô hình tuỳ chỉnh.
Nếu bạn lưu trữ mô hình bằng Firebase, Bộ công cụ học máy sẽ tự động cập nhật người dùng của bạn
với phiên bản mới nhất.
Lưu trữ mô hình bằng Firebase để giảm kích thước tệp nhị phân của ứng dụng và đảm bảo ứng dụng luôn sử dụng phiên bản mới nhất của mô hình
Suy luận học máy trên thiết bị
Tiến hành suy luận trong ứng dụng iOS hoặc Android bằng cách sử dụng SDK bộ công cụ học máy để
chạy mô hình TensorFlow Lite tuỳ chỉnh. Mô hình có thể được kết hợp với
được lưu trữ trên Đám mây hoặc cả hai.
Dự phòng mô hình tự động
Chỉ định nhiều nguồn mô hình; sử dụng mô hình được lưu trữ cục bộ khi không có mô hình được lưu trữ trên đám mây
Tự động cập nhật mô hình
Định cấu hình những điều kiện mà ứng dụng của bạn tự động tải xuống
phiên bản mới của mô hình: khi thiết bị của người dùng ở trạng thái rảnh, đang sạc,
hoặc có kết nối Wi-Fi
Lộ trình triển khai
Đào tạo mô hình TensorFlow
Xây dựng và huấn luyện một mô hình tuỳ chỉnh bằng TensorFlow. Hoặc huấn luyện lại một mô hình hiện có để giải quyết vấn đề tương tự như mục tiêu bạn muốn đạt được.
Xem TensorFlow Lite
Hướng dẫn cho nhà phát triển.
Chuyển đổi mô hình thành TensorFlow Lite
Chuyển đổi mô hình của bạn từ định dạng TensorFlow tiêu chuẩn sang TensorFlow Lite bằng cách
cố định biểu đồ rồi sử dụng Trình chuyển đổi tối ưu hoá TensorFlow
(TOCO). Xem TensorFlow Lite
Hướng dẫn cho nhà phát triển.
Lưu trữ mô hình TensorFlow Lite bằng Firebase
Không bắt buộc: Khi bạn lưu trữ mô hình TensorFlow Lite bằng Firebase và
Bộ công cụ học máy vào ứng dụng của bạn. Bộ công cụ học máy sẽ giúp người dùng của bạn
bằng phiên bản mới nhất của mô hình của bạn. Bạn có thể định cấu hình Bộ công cụ học máy để
tự động tải bản cập nhật mô hình xuống khi thiết bị của người dùng không hoạt động hoặc
đang sạc hoặc có kết nối Wi-Fi.
Sử dụng mô hình TensorFlow Lite để suy luận
Sử dụng các API mô hình tuỳ chỉnh của Bộ công cụ học máy trong ứng dụng iOS hoặc Android của bạn để thực hiện
suy luận với mô hình được lưu trữ trong Firebase hoặc theo gói ứng dụng.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Custom Models\n=============\n\nplat_ios plat_android \nIf you're an experienced ML developer and ML Kit's pre-built models don't\nmeet your needs, you can use a custom\n[TensorFlow Lite](//www.tensorflow.org/lite/) model with\nML Kit.\n\nHost your TensorFlow Lite models using Firebase or package them with your app.\nThen, use the ML Kit SDK to perform inference using the best-available\nversion of your custom model.\nIf you host your model with Firebase, ML Kit automatically updates your users\nwith the latest version.\n\n[iOS](/docs/ml-kit/ios/use-custom-models)\n[Android](/docs/ml-kit/android/use-custom-models)\n| This is a beta release of ML Kit for Firebase. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.\n\nKey capabilities\n----------------\n\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| TensorFlow Lite model hosting | Host your models using Firebase to reduce your app's binary size and to make sure your app is always using the most recent version available of your model |\n| On-device ML inference | Perform inference in an iOS or Android app by using the ML Kit SDK to run your custom TensorFlow Lite model. The model can be bundled with the app, hosted in the Cloud, or both. |\n| Automatic model fallback | Specify multiple model sources; use a locally-stored model when the Cloud-hosted model is unavailable |\n| Automatic model updates | Configure the conditions under which your app automatically downloads new versions of your model: when the user's device is idle, is charging, or has a Wi-Fi connection |\n\nImplementation path\n-------------------\n\n|---|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | **Train your TensorFlow model** | Build and train a custom model using TensorFlow. Or, re-train an existing model that solves a problem similar to what you want to achieve. See the TensorFlow Lite [Developer Guide](//www.tensorflow.org/mobile/tflite/devguide). |\n| | **Convert the model to TensorFlow Lite** | Convert your model from standard TensorFlow format to TensorFlow Lite by freezing the graph, and then using the TensorFlow Optimizing Converter (TOCO). See the TensorFlow Lite [Developer Guide](//www.tensorflow.org/mobile/tflite/devguide). |\n| | **Host your TensorFlow Lite model with Firebase** | Optional: When you host your TensorFlow Lite model with Firebase and include the ML Kit SDK in your app, ML Kit keeps your users up to date with the latest version of your model. You can configure ML Kit to automatically download model updates when the user's device is idle or charging, or has a Wi-Fi connection. |\n| | **Use the TensorFlow Lite model for inference** | Use ML Kit's custom model APIs in your iOS or Android app to perform inference with your Firebase-hosted or app-bundled model. |"]]