Add homepage for TFLite Model Maker under "guide"
PiperOrigin-RevId: 325368667 Change-Id: I3f4d1162684564373a9abbda59c520928448a0cf
This commit is contained in:
parent
d547659011
commit
0a764ff2fe
@ -93,6 +93,11 @@ upper_tabs:
|
|||||||
- title: "1.x compatibility"
|
- title: "1.x compatibility"
|
||||||
path: /lite/convert/1x_compatibility
|
path: /lite/convert/1x_compatibility
|
||||||
|
|
||||||
|
- heading: "Create a model"
|
||||||
|
- title: "TensorFlow Lite Model Maker"
|
||||||
|
status: experimental
|
||||||
|
path: /lite/guide/model_maker
|
||||||
|
|
||||||
- heading: "Inference"
|
- heading: "Inference"
|
||||||
- title: "Overview"
|
- title: "Overview"
|
||||||
path: /lite/guide/inference
|
path: /lite/guide/inference
|
||||||
|
@ -67,6 +67,10 @@ If you have designed and trained your own TensorFlow model, or you have trained
|
|||||||
a model obtained from another source, you must
|
a model obtained from another source, you must
|
||||||
[convert it to the TensorFlow Lite format](#2_convert_the_model_format).
|
[convert it to the TensorFlow Lite format](#2_convert_the_model_format).
|
||||||
|
|
||||||
|
You can also try [The TensorFlow Lite Model Maker library](model_maker.md) which
|
||||||
|
simplifies the process of training a TensorFlow Lite model using custom
|
||||||
|
datasets.
|
||||||
|
|
||||||
## 2. Convert the model
|
## 2. Convert the model
|
||||||
|
|
||||||
<a id="2_convert_the_model_format"></a>
|
<a id="2_convert_the_model_format"></a>
|
||||||
|
60
tensorflow/lite/g3doc/guide/model_maker.md
Normal file
60
tensorflow/lite/g3doc/guide/model_maker.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# TensorFlow Lite Model Maker
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The TensorFlow Lite Model Maker library simplifies the process of training a
|
||||||
|
TensorFlow Lite model using custom dataset. It uses transfer learning to reduce
|
||||||
|
the amount of training data required and shorten the training time.
|
||||||
|
|
||||||
|
## Supported Tasks
|
||||||
|
|
||||||
|
The Model Maker library currently supports the following ML tasks. Click the
|
||||||
|
links below for guides on how to train the model.
|
||||||
|
|
||||||
|
Supported Tasks | Task Utility
|
||||||
|
-------------------------------------------------------------------------------------------------------- | ------------
|
||||||
|
Image Classification [guide](https://www.tensorflow.org/lite/tutorials/model_maker_image_classification) | Classify images into predefined categories.
|
||||||
|
Text Classification [guide](https://www.tensorflow.org/lite/tutorials/model_maker_text_classification) | Classify text into predefined categories.
|
||||||
|
Question Answer [guide](https://www.tensorflow.org/lite/tutorials/model_maker_question_answer) | Find the answer in a certain context for a given question.
|
||||||
|
|
||||||
|
## End-to-End Example
|
||||||
|
|
||||||
|
Model Maker allows you to train a TensorFlow Lite model using custom datasets in
|
||||||
|
just a few lines of code. For example, here are the steps to train an image
|
||||||
|
classification model.
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Load input data specific to an on-device ML app.
|
||||||
|
data = ImageClassifierDataLoader.from_folder('flower_photos/')
|
||||||
|
train_data, test_data = data.split(0.9)
|
||||||
|
|
||||||
|
# Customize the TensorFlow model.
|
||||||
|
model = image_classifier.create(data)
|
||||||
|
|
||||||
|
# Evaluate the model.
|
||||||
|
loss, accuracy = model.evaluate(test_data)
|
||||||
|
|
||||||
|
# Export to Tensorflow Lite model and label file in `export_dir`.
|
||||||
|
model.export(export_dir='/tmp/')
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details, see the
|
||||||
|
[image classification guide](https://www.tensorflow.org/lite/tutorials/model_maker_image_classification).
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
There are two ways to install Model Maker.
|
||||||
|
|
||||||
|
* Install a prebuilt pip package
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip install tflite-model-maker
|
||||||
|
```
|
||||||
|
|
||||||
|
* Clone the source code from GitHub and install.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/tensorflow/examples
|
||||||
|
cd examples
|
||||||
|
pip install .[model_maker]
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user